feat(jobs): cutover - bridge_mrp gate, menu nesting, migration robustness
Three changes to support live cutover on entech (2026-04-25): 1. Bridge_mrp gate: sale.order.action_confirm in fusion_plating_bridge_mrp now skips _fp_auto_create_mo when the x_fc_use_native_jobs config flag is True. Without this, every SO confirm would create both an mrp.production AND an fp.job (duplicate work). The gate is the only modification to bridge_mrp during the migration — the rest stays untouched. 2. Menu nesting: Plating Jobs (Native) now lives INSIDE the existing Plating app (parent=menu_fp_root) instead of as a separate top-level app. Two parallel 'Plating' apps was confusing UX. Work Centres (Native) goes under the existing Configuration sub-menu. '(Native)' suffix is temporary — drops at full legacy removal. 3. Migration script robustness: per-MO savepoints (so one bad MO doesn't abort the whole transaction with cascading 'transaction aborted' errors) + extended partner resolver fallback chain (warehouse partner → company partner) for orphan demo MOs without SO link or x_fc_customer_id. Verified: 43 MOs + 297 WOs migrated on entech with 0 errors after these fixes. 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:
@@ -1,28 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<!-- Top-level "Plating Jobs (new)" menu, manager-only during Phase 1.
|
||||
The fully-fledged operator-facing menu structure lands in
|
||||
Phase 6 when shopfloor is rewritten. -->
|
||||
<menuitem id="menu_fp_jobs_root"
|
||||
name="Plating Jobs (new)"
|
||||
sequence="47"
|
||||
<!-- Native job model menus, nested INSIDE the existing Plating app
|
||||
(menu_fp_root). Manager-only during the migration period so
|
||||
operators don't see two parallel job lists.
|
||||
|
||||
Naming uses "(Native)" suffix to distinguish from the legacy
|
||||
MO/WO menus that bridge_mrp ships under Operations. After
|
||||
cutover and legacy uninstall, the suffix can be dropped. -->
|
||||
|
||||
<menuitem id="menu_fp_jobs_native_root"
|
||||
name="Plating Jobs (Native)"
|
||||
parent="menu_fp_root"
|
||||
sequence="4"
|
||||
groups="fusion_plating.group_fusion_plating_manager"/>
|
||||
|
||||
<menuitem id="menu_fp_jobs_jobs"
|
||||
name="Jobs"
|
||||
parent="menu_fp_jobs_root"
|
||||
parent="menu_fp_jobs_native_root"
|
||||
action="action_fp_job"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem id="menu_fp_jobs_steps"
|
||||
name="Steps (Admin)"
|
||||
parent="menu_fp_jobs_root"
|
||||
parent="menu_fp_jobs_native_root"
|
||||
action="action_fp_job_step"
|
||||
sequence="20"/>
|
||||
|
||||
<menuitem id="menu_fp_jobs_work_centres"
|
||||
name="Work Centres"
|
||||
parent="menu_fp_jobs_root"
|
||||
name="Work Centres (Native)"
|
||||
parent="menu_fp_config"
|
||||
action="action_fp_work_centre"
|
||||
sequence="30"/>
|
||||
sequence="55"
|
||||
groups="fusion_plating.group_fusion_plating_manager"/>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user