fix(plating): Process Composer/Editor breadcrumb accumulation
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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': """
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user