feat(fusion_plating): Sub 3 — process_node gets part_catalog_id, cloned_from_id, treatment_uom; opt_in_out label rename (Task 1)
This commit is contained in:
@@ -172,9 +172,9 @@ class FpProcessNode(models.Model):
|
|||||||
)
|
)
|
||||||
opt_in_out = fields.Selection(
|
opt_in_out = fields.Selection(
|
||||||
[
|
[
|
||||||
('disabled', 'Disabled'),
|
('disabled', 'Always Included'),
|
||||||
('opt_in', 'Opt-In'),
|
('opt_out', 'Included by Default'),
|
||||||
('opt_out', 'Opt-Out'),
|
('opt_in', 'Excluded by Default'),
|
||||||
],
|
],
|
||||||
string='Opt In/Out',
|
string='Opt In/Out',
|
||||||
default='disabled',
|
default='disabled',
|
||||||
@@ -199,6 +199,39 @@ class FpProcessNode(models.Model):
|
|||||||
tracking=True,
|
tracking=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# ---- Part ownership & provenance (Sub 3) --------------------------------
|
||||||
|
|
||||||
|
# Sub 3 — part ownership. NULL on shared templates (admin-managed);
|
||||||
|
# populated on every node in a part's cloned tree.
|
||||||
|
part_catalog_id = fields.Many2one(
|
||||||
|
'fp.part.catalog',
|
||||||
|
string='Part',
|
||||||
|
ondelete='cascade',
|
||||||
|
index=True,
|
||||||
|
help='Populated on nodes that belong to a specific part\'s '
|
||||||
|
'composed process tree. NULL on shared templates.',
|
||||||
|
)
|
||||||
|
# Sub 3 — source-template reference on cloned nodes. Enables
|
||||||
|
# future "template drifted" indicators. Optional, not load-bearing.
|
||||||
|
cloned_from_id = fields.Many2one(
|
||||||
|
'fusion.plating.process.node',
|
||||||
|
string='Cloned From',
|
||||||
|
ondelete='set null',
|
||||||
|
help='On a part-cloned node, points back at the source template '
|
||||||
|
'node it was copied from.',
|
||||||
|
)
|
||||||
|
# Sub 3 — per-node treatment UoM for pricing / cost tracking.
|
||||||
|
treatment_uom = fields.Selection(
|
||||||
|
[
|
||||||
|
('lbs', 'Lbs (weight-based)'),
|
||||||
|
('sq_in', 'Sq in (area-based)'),
|
||||||
|
],
|
||||||
|
string='Treatment UoM',
|
||||||
|
help='How this process step is measured for costing / pricing. '
|
||||||
|
'Picks which physical property of the part to multiply by '
|
||||||
|
'the per-unit rate: weight (Lbs) or surface area (Sq in).',
|
||||||
|
)
|
||||||
|
|
||||||
# ---- Recipe-only fields (apply when node_type='recipe') -----------------
|
# ---- Recipe-only fields (apply when node_type='recipe') -----------------
|
||||||
# These migrate Steelhead's recipe-level metadata: lead time, the
|
# These migrate Steelhead's recipe-level metadata: lead time, the
|
||||||
# product/service tied to this recipe, the contract review approver
|
# product/service tied to this recipe, the contract review approver
|
||||||
|
|||||||
Reference in New Issue
Block a user