feat(jobs): B3 - second hook in fp.job.action_confirm for bake step.instructions write
This commit is contained in:
@@ -1685,6 +1685,18 @@ class FpJob(models.Model):
|
|||||||
)
|
)
|
||||||
if pending_steps:
|
if pending_steps:
|
||||||
pending_steps.write({'state': 'ready'})
|
pending_steps.write({'state': 'ready'})
|
||||||
|
|
||||||
|
# Express Orders (2026-05-26) — second pass of the override
|
||||||
|
# helper. The first pass (in sale_order._fp_auto_create_job)
|
||||||
|
# creates override rows. Now that steps exist (just generated
|
||||||
|
# above), this pass writes Express bake_instructions to the
|
||||||
|
# bake step's `instructions` field. Idempotent: pre-deletes
|
||||||
|
# prior masking/bake overrides then recreates identical rows.
|
||||||
|
if (job.recipe_id and job.step_ids
|
||||||
|
and 'x_fc_masking_enabled' in self.env['sale.order.line']._fields):
|
||||||
|
for sol in job.sale_order_line_ids:
|
||||||
|
if hasattr(sol, '_fp_apply_express_overrides_to_job'):
|
||||||
|
sol._fp_apply_express_overrides_to_job(job)
|
||||||
# 2026-04-28 — auto-populate facility_id + manager_id so the
|
# 2026-04-28 — auto-populate facility_id + manager_id so the
|
||||||
# job header surfaces them on the form. Page-1 audit found
|
# job header surfaces them on the form. Page-1 audit found
|
||||||
# both empty on confirmed jobs.
|
# both empty on confirmed jobs.
|
||||||
|
|||||||
Reference in New Issue
Block a user