feat(numbering): wire CoC/RCV/DLV/PU into parent-numbered mixin + rename counters

Per-model counter fields on sale.order renamed to x_fc_pn_*_count
to avoid collision with pre-existing compute fields of the same
short name in bridge_mrp / receiving / configurator (silent
compute-override was suppressing the storage). 4 child models
(fp.certificate, fp.receiving, fusion.plating.delivery,
fusion.plating.pickup.request) now derive names as PFX-<parent>
with -NN suffix from the 2nd onward.

fusion.plating.pickup.request gains a sale_order_id field
(optional) so pickups created against an SO get parent-derived
names, while standalone pickups (pre-SO) fall back to PU/YYYY/NNNN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-12 13:30:37 -04:00
parent 765a0a4c82
commit 0d85063b5e
17 changed files with 489 additions and 64 deletions

View File

@@ -88,16 +88,30 @@ class FpRecordInputsController(http.Controller):
if node and node.description:
instructions_html = node.description
# Recipe root id — surfaced so the dialog's "Edit Recipe" shortcut
# opens the Simple Editor on the EXACT recipe variant this job is
# reading from. Avoids the trap where the operator edits a sibling
# variant (e.g. the template, while the job runs the part-specific
# clone) and wonders why their min/max never appears.
recipe_root_id = False
if node:
root = node
while root.parent_id:
root = root.parent_id
recipe_root_id = root.id
return {
'ok': True,
'step': {
'id': step.id,
'name': step.name,
'recipe_node_id': node.id if node else False,
},
'job': {
'id': step.job_id.id,
'name': step.job_id.name,
},
'recipe_root_id': recipe_root_id,
'prompts': prompts,
'user_initials': user_initials or '',
'instructions_html': instructions_html or '',