This commit is contained in:
gsinghpal
2026-05-01 00:20:40 -04:00
parent bdcbd86db2
commit 1da27ed6bf
8 changed files with 117 additions and 12 deletions

View File

@@ -5,7 +5,7 @@
{
'name': 'Fusion Plating',
'version': '19.0.18.8.0',
'version': '19.0.18.11.0',
'category': 'Manufacturing/Plating',
'summary': 'Core plating / metal finishing ERP: facilities, processes, tanks, baths, jobs, operators.',
'description': """

View File

@@ -546,15 +546,23 @@ export class RecipeTreeEditor extends Component {
// ---- Navigation ---------------------------------------------------------
onBackToList() {
// 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.
// Pop this editor off the action stack and restore the
// previous controller — which is whatever opened the editor:
// * Recipes list → recipe form → editor ⇒ back to recipe form
// * Part form → composer → editor ⇒ back to composer
// * Part form → editor (direct link) ⇒ back to part form
//
// 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.
// restore() preserves the full breadcrumb trail.
// clearBreadcrumbs: true (the old behaviour) would wipe parent
// crumbs and isolate the user on a single-crumb page.
try {
this.action.restore();
return;
} catch (e) {
// No prior controller — fall through to a sensible default.
}
// Fallback: when opened directly via URL with no prior crumb,
// pick the most contextual landing page we have.
if (this._partId) {
this.action.doAction({
type: "ir.actions.act_window",

View File

@@ -196,6 +196,17 @@ export class FpSimpleRecipeEditor extends Component {
* breadcrumb stack so a second visit shows nonsense.
*/
onBackToList() {
// Pop this editor off the action stack and restore the
// previous controller — preserves the full breadcrumb trail
// (Recipes > LGPS1104 > Editor → back keeps "Recipes"
// visible; Part > Composer > Editor → back returns to the
// Composer with crumbs intact).
try {
this.action.restore();
return;
} catch (e) {
// No prior controller — fall through to a sensible default.
}
if (this._partId) {
this.action.doAction(
{

View File

@@ -51,7 +51,15 @@
class="oe_stat_button" icon="fa-sitemap"
invisible="node_type != 'recipe'">
<field name="child_count" widget="statinfo"
string="Steps"/>
string="Tree Editor"/>
</button>
<button name="action_open_simple_editor" type="object"
class="oe_stat_button" icon="fa-list-ol"
invisible="node_type != 'recipe'">
<div class="o_stat_info">
<span class="o_stat_text">Simple</span>
<span class="o_stat_text">Editor</span>
</div>
</button>
</div>
<widget name="web_ribbon" title="Archived"