diff --git a/fusion_plating/fusion_plating_shopfloor/__manifest__.py b/fusion_plating/fusion_plating_shopfloor/__manifest__.py index e53d7548..e107543d 100644 --- a/fusion_plating/fusion_plating_shopfloor/__manifest__.py +++ b/fusion_plating/fusion_plating_shopfloor/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Fusion Plating — Shop Floor', - 'version': '19.0.37.0.1', + 'version': '19.0.37.0.3', 'category': 'Manufacturing/Plating', 'summary': 'Shop-floor tablet stations, QR scanning, bake window enforcer.', 'description': """ diff --git a/fusion_plating/fusion_plating_shopfloor/controllers/workspace_controller.py b/fusion_plating/fusion_plating_shopfloor/controllers/workspace_controller.py index 08dfe0be..c455a7d0 100644 --- a/fusion_plating/fusion_plating_shopfloor/controllers/workspace_controller.py +++ b/fusion_plating/fusion_plating_shopfloor/controllers/workspace_controller.py @@ -75,6 +75,8 @@ class FpWorkspaceController(http.Controller): 'name': step.name or '', 'kind': step.kind or 'other', 'kind_label': dict(step._fields['kind'].selection).get(step.kind, ''), + # Drives the embedded rack-split panel inside this step's row. + 'is_racking': step.area_kind == 'racking', 'state': step.state, 'assigned_user_id': step.assigned_user_id.id or False, 'assigned_user_name': step.assigned_user_id.name or '', @@ -283,14 +285,9 @@ class FpWorkspaceController(http.Controller): 'is_manager': env.user.has_group( 'fusion_plating.group_fusion_plating_manager', ), - # Racking panel (multi-rack split) shows when the WO is at the - # racking step and it's the current actionable work. Detect by - # area_kind == 'racking' (corrected classification) — NOT - # _fp_is_racking_step(), which would also match mis-tagged - # De-Racking steps (kind='racking' in the data). - 'is_at_racking': bool(job.step_ids.filtered( - lambda s: s.area_kind == 'racking' - and s.state in ('ready', 'in_progress', 'paused'))), + # Note: the rack-split panel is gated per-step via each step's + # 'is_racking' flag (area_kind == 'racking'), embedded in the + # racking step's row — not a job-level panel. } # ====================================================================== diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js b/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js index b52bbae4..499e4245 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js +++ b/fusion_plating/fusion_plating_shopfloor/static/src/js/job_workspace.js @@ -69,7 +69,7 @@ export class FpJobWorkspace extends Component { this.action.doAction({ type: "ir.actions.client", tag: "fp_plant_kanban", - target: "current", + target: "main", }); return; } @@ -82,7 +82,7 @@ export class FpJobWorkspace extends Component { this.action.doAction({ type: "ir.actions.client", tag: "fp_plant_kanban", - target: "current", + target: "main", }); return; } @@ -164,16 +164,16 @@ export class FpJobWorkspace extends Component { // ---- Navigation -------------------------------------------------------- onBack() { - // The workspace is opened with target: "current" which REPLACES - // the current action and wipes the backstack. Navigate explicitly - // to the plant kanban — the sole Shop Floor surface as of - // 2026-05-25 (fp_shopfloor_landing was retired the same day). - // See CLAUDE.md Critical Rule 21 + the "Legacy-action redirect" - // section. + // target: "main" CLEARS the breadcrumb stack (Odoo 19: + // action.target === "main" => clearBreadcrumbs in action_service.js). + // target: "current" was APPENDING — each kanban<->workspace switch + // grew the /odoo/... URL, and lock/unlock window.location.reload() + // preserved it, so the address bar ballooned. "main" keeps the URL a + // single action. The plant kanban is the sole Shop Floor surface. this.action.doAction({ type: "ir.actions.client", tag: "fp_plant_kanban", - target: "current", + target: "main", }); } diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/js/plant_kanban.js b/fusion_plating/fusion_plating_shopfloor/static/src/js/plant_kanban.js index 738c0dae..440191aa 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/js/plant_kanban.js +++ b/fusion_plating/fusion_plating_shopfloor/static/src/js/plant_kanban.js @@ -212,7 +212,7 @@ export class FpPlantKanban extends Component { type: "ir.actions.client", tag: "fp_job_workspace", params: { job_id: res.id }, - target: "current", + target: "main", }); return; // navigating away — skip the refresh } else if (res.model === "fp.job.step") { @@ -223,7 +223,7 @@ export class FpPlantKanban extends Component { job_id: res.job_id || 0, focus_step_id: res.id, }, - target: "current", + target: "main", }); return; } else if (res.action_tag) { @@ -232,7 +232,7 @@ export class FpPlantKanban extends Component { type: "ir.actions.client", tag: res.action_tag, params: res.action_params || {}, - target: "current", + target: "main", }); return; } else { diff --git a/fusion_plating/fusion_plating_shopfloor/static/src/xml/job_workspace.xml b/fusion_plating/fusion_plating_shopfloor/static/src/xml/job_workspace.xml index 8344c447..64659162 100644 --- a/fusion_plating/fusion_plating_shopfloor/static/src/xml/job_workspace.xml +++ b/fusion_plating/fusion_plating_shopfloor/static/src/xml/job_workspace.xml @@ -80,11 +80,6 @@