feat(jobs): B3 - hook Express override helper into _fp_auto_create_job
This commit is contained in:
@@ -563,6 +563,17 @@ class SaleOrder(models.Model):
|
|||||||
self.name, job.name, qty, (recipe.name if recipe else '-'),
|
self.name, job.name, qty, (recipe.name if recipe else '-'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Express Orders (2026-05-26) — apply per-line masking + bake
|
||||||
|
# overrides to the new job. This runs BEFORE step generation
|
||||||
|
# (which happens in fp.job.action_confirm) so the override rows
|
||||||
|
# are in place when _generate_steps_from_recipe reads override_map.
|
||||||
|
# Step.instructions writes are deferred to a second pass after
|
||||||
|
# step gen — see fp.job.action_confirm override.
|
||||||
|
if job.recipe_id and 'x_fc_masking_enabled' in self.env['sale.order.line']._fields:
|
||||||
|
for sol in lines:
|
||||||
|
if hasattr(sol, '_fp_apply_express_overrides_to_job'):
|
||||||
|
sol._fp_apply_express_overrides_to_job(job)
|
||||||
|
|
||||||
# Bump SO counter to reflect the bulk creation. Future manual
|
# Bump SO counter to reflect the bulk creation. Future manual
|
||||||
# WO additions pick up from here via the mixin standard path.
|
# WO additions pick up from here via the mixin standard path.
|
||||||
if parent and n_groups:
|
if parent and n_groups:
|
||||||
|
|||||||
Reference in New Issue
Block a user