feat(jobs): add lifecycle hooks — portal/QC/delivery/invoice (Tasks 2.6-2.9)
- Task 2.6: fp.job.action_confirm auto-creates fusion.plating.portal.job with x_fc_job_id back-reference. Idempotent (skip if already linked). - Task 2.7: fp.job.action_confirm checks customer.x_fc_requires_qc and best-effort creates a fusion.plating.quality.check (the model lives in bridge_mrp; runtime-detected to avoid dep cycle). - Task 2.8: fp.job.button_mark_done sets state='done', date_finished, auto-creates draft fusion.plating.delivery and best-effort triggers fp.certificate generation. - Task 2.9: account.move.action_post links invoice -> fp.job via SO origin lookup, updates portal_job state to complete and stamps invoice_ref. 5 new tests cover: portal job creation + idempotency, mark_done state + delivery, cancel-then-mark-done blocked. Best-effort patterns (try/except + runtime model detection) used for QC + cert because their target models are in dependent modules that this module doesn't depend on by design. qc_check_id field on fp.job still deferred — adding it here would require depending on bridge_mrp. Manifest 19.0.1.4.0 -> 19.0.1.5.0. Part of: native job model migration (spec 2026-04-25) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,5 +7,7 @@
|
||||
|
||||
from . import fp_job
|
||||
from . import fp_job_node_override
|
||||
from . import fp_portal_job
|
||||
from . import account_move
|
||||
from . import res_config_settings
|
||||
from . import sale_order
|
||||
|
||||
Reference in New Issue
Block a user