From c76bbd85eb7b023fcc0dbe3bfab82cb3f8309942 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Thu, 23 Apr 2026 07:48:38 -0400 Subject: [PATCH] fix(plating): Process Composer/Editor breadcrumb accumulation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two separate issues were stacking up on the breadcrumb trail: 1. The composer was launching the tree editor with the name "Process Composer — …" — identical to its own label. The breadcrumb trail ended up showing "Process Composer / Process Composer" because both pages claimed the same name. Renamed the tree-editor instance to "Process Editor — …" so the two pages read distinctly. 2. Every "Back to part" click pushed a new entry onto the breadcrumb stack instead of resetting. After one round-trip the trail looked like "… / Composer / Editor / Part"; after two it was "… / Composer / Editor / Part / Composer / Editor / Part". Added clearBreadcrumbs: true to both back paths (composer's backToPart and tree-editor's onBackToList) so a RETURN action actually resets the stack. fusion_plating → 19.0.6.2.0 fusion_plating_configurator → 19.0.12.4.0 Co-Authored-By: Claude Opus 4.7 (1M context) --- fusion_plating/fusion_plating/__manifest__.py | 2 +- .../static/src/js/recipe_tree_editor.js | 12 +++++++++++- .../fusion_plating_configurator/__manifest__.py | 2 +- .../static/src/js/fp_part_process_composer.js | 11 ++++++++++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/fusion_plating/fusion_plating/__manifest__.py b/fusion_plating/fusion_plating/__manifest__.py index 53d70c09..0e16bd44 100644 --- a/fusion_plating/fusion_plating/__manifest__.py +++ b/fusion_plating/fusion_plating/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Fusion Plating', - 'version': '19.0.6.1.0', + 'version': '19.0.6.2.0', 'category': 'Manufacturing/Plating', 'summary': 'Core plating / metal finishing ERP: facilities, processes, tanks, baths, jobs, operators.', 'description': """ diff --git a/fusion_plating/fusion_plating/static/src/js/recipe_tree_editor.js b/fusion_plating/fusion_plating/static/src/js/recipe_tree_editor.js index e237a3f4..11041478 100644 --- a/fusion_plating/fusion_plating/static/src/js/recipe_tree_editor.js +++ b/fusion_plating/fusion_plating/static/src/js/recipe_tree_editor.js @@ -428,6 +428,12 @@ export class RecipeTreeEditor extends Component { // If the editor was opened from the part-scoped Process Composer // (context carried part_id), return to that part's form instead // of the generic Recipes list. + // + // clearBreadcrumbs: this is a semantic RETURN, not a forward + // navigation. Without it, every round-trip (part → composer → + // editor → back) leaves its intermediate pages on the breadcrumb + // stack, so a second visit shows "…/Process Composer/Process + // Editor/Process Composer/Process Editor/Part" nonsense. if (this._partId) { this.action.doAction({ type: "ir.actions.act_window", @@ -435,10 +441,14 @@ export class RecipeTreeEditor extends Component { res_id: this._partId, views: [[false, "form"]], target: "current", + }, { + clearBreadcrumbs: true, }); return; } - this.action.doAction("fusion_plating.action_fp_process_recipe"); + this.action.doAction("fusion_plating.action_fp_process_recipe", { + clearBreadcrumbs: true, + }); } onOpenForm(nodeId) { diff --git a/fusion_plating/fusion_plating_configurator/__manifest__.py b/fusion_plating/fusion_plating_configurator/__manifest__.py index 3b8dc0d9..ba9ab820 100644 --- a/fusion_plating/fusion_plating_configurator/__manifest__.py +++ b/fusion_plating/fusion_plating_configurator/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Fusion Plating — Configurator', - 'version': '19.0.12.3.0', + 'version': '19.0.12.4.0', 'category': 'Manufacturing/Plating', 'summary': 'Quotation configurator with part catalog, coating configs, and formula-based pricing engine.', 'description': """ diff --git a/fusion_plating/fusion_plating_configurator/static/src/js/fp_part_process_composer.js b/fusion_plating/fusion_plating_configurator/static/src/js/fp_part_process_composer.js index 832d3ee8..92f19df6 100644 --- a/fusion_plating/fusion_plating_configurator/static/src/js/fp_part_process_composer.js +++ b/fusion_plating/fusion_plating_configurator/static/src/js/fp_part_process_composer.js @@ -124,22 +124,31 @@ export class FpPartProcessComposer extends Component { if (!id) return; // The existing fp_recipe_tree_editor reads recipe_id from // this.props.action?.context — pass it via `context`, not `params`. + // Label the editor as "Process Editor …" so it doesn't collide with + // "Process Composer …" in the breadcrumb stack; the two pages are + // distinct roles and should read differently in the trail. this.action.doAction({ type: "ir.actions.client", tag: "fp_recipe_tree_editor", - name: `Process Composer — ${(this.state.part && this.state.part.display) || ""}`, + name: `Process Editor — ${(this.state.part && this.state.part.display) || ""}`, context: { recipe_id: id, part_id: this.partId }, target: "current", }); } backToPart() { + // clearBreadcrumbs: "Back" is semantically a RETURN, not a forward + // navigation — reset the stack to just the part form so repeated + // round-trips (part → composer → editor → back) don't accumulate + // duplicate entries. this.action.doAction({ type: "ir.actions.act_window", res_model: "fp.part.catalog", res_id: this.partId, views: [[false, "form"]], target: "current", + }, { + clearBreadcrumbs: true, }); } }