This commit is contained in:
gsinghpal
2026-04-28 19:39:37 -04:00
parent 2d42b33d68
commit 13e300d90e
103 changed files with 4959 additions and 331 deletions

View File

@@ -188,6 +188,7 @@ export class FpPartProcessComposer extends Component {
}
openRecipeEditor(rootId) {
// Tree editor — the original drag-and-drop hierarchy view.
const id = rootId || this.state.rootId;
if (!id) return;
this.action.doAction({
@@ -199,6 +200,22 @@ export class FpPartProcessComposer extends Component {
});
}
openRecipeSimpleEditor(rootId) {
// Simple Recipe Editor (Sub 12a) — flat 2-pane drag-drop layout.
// Lives alongside the tree editor; the user picks per-variant
// which one to open. Both edit the same underlying tree, so
// changes flow back-and-forth without conflict.
const id = rootId || this.state.rootId;
if (!id) return;
this.action.doAction({
type: "ir.actions.client",
tag: "fp_simple_recipe_editor",
name: `Process Editor (Simple) — ${(this.state.part && this.state.part.display) || ""}`,
context: { recipe_id: id, part_id: this.partId },
target: "current",
});
}
backToPart() {
this.action.doAction({
type: "ir.actions.act_window",

View File

@@ -83,8 +83,15 @@
<td class="text-end">
<button class="btn btn-sm btn-primary me-1"
t-att-disabled="state.busy"
t-on-click="() => this.openRecipeEditor(v.id)">
<i class="fa fa-pencil"/> Edit
t-on-click="() => this.openRecipeEditor(v.id)"
title="Open the tree editor (drag-and-drop hierarchy view)">
<i class="fa fa-pencil"/> Tree
</button>
<button class="btn btn-sm btn-info me-1"
t-att-disabled="state.busy"
t-on-click="() => this.openRecipeSimpleEditor(v.id)"
title="Open the Simple Recipe Editor (flat 2-pane drag-drop)">
<i class="fa fa-list-alt"/> Simple
</button>
<button class="btn btn-sm btn-secondary me-1"
t-att-disabled="state.busy"