Files
Odoo-Modules/fusion_plating
gsinghpal 821e768b7e fix(simple-editor): surface operations nested inside sub_process nodes
Bug on ENP-STEEL-BASIC (2026-05-20): authoring used the Tree Editor
to build a recipe with a "Steel Line" sub_process holding 7 nested
operations (Cleaner, Acid Dip, Nickel Strike, E-Nickel Plate, etc.).
The Simple Editor's /fp/simple_recipe/load endpoint only walked
`recipe.child_ids`, so it returned 10 steps. The work order generator
(fp.job._generate_steps) walked the same tree depth-first and emitted
16 steps. Author and operator disagreed about what was in the recipe.

Fix: new `_flatten_recipe_operations(recipe)` helper walks the tree
depth-first, recurses into `recipe` and `sub_process`, emits each
`operation` exactly once, skips `step` children (they're sub-
instructions of operations). Mirrors the WO walker.

Step payload now carries a `nested_under` string — the chained sub-
process name(s) the operation lives inside (empty for top-level).
The Simple Editor XML renders that as a small "↳ Steel Line" badge
next to the step name so the author can see where each row came from
in the tree. Deep nesting chains with ' › ' (e.g. "Outer › Inner").

`step` children of `recipe` itself remain invisible — they were
silently skipped by the WO generator pre-19.0.18.8.0 anyway (only
operation nodes spawn fp.job.step rows). Restoring them here would
contradict that long-standing contract.

Edit/insert/reorder/remove endpoints unchanged: editing a nested
operation's name / description / tanks works (no parent change).
Drag-reorder within sub-process siblings still works. Drag across
sub-process boundaries isn't supported — opens the door for a Tree
Editor follow-up if needed, but the immediate "I can't see my
steps" complaint is resolved.

ENP-STEEL-BASIC on entech now shows all 16 operations in the Simple
Editor (was 10), with the 7 inside Steel Line tagged accordingly.

Tests: 7 new (TestSimpleRecipeFlatten) — flat recipes still work,
nested operations surface with correct path label, sub_process
nodes never appear as editor rows, step children of operations
stay hidden, deep-nested sub_processes chain path labels.

Module: fusion_plating 19.0.20.2.0 → 19.0.20.3.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 22:22:54 -04:00
..
2026-04-20 13:07:15 -04:00
2026-05-18 22:33:23 -04:00
2026-04-26 15:05:17 -04:00
2026-05-18 22:33:23 -04:00
2026-04-16 20:53:53 -04:00
2026-05-18 22:33:23 -04:00
2026-05-10 10:25:12 -04:00
2026-05-18 22:33:23 -04:00
2026-05-18 22:33:23 -04:00
2026-04-28 19:39:37 -04:00
2026-05-18 22:33:23 -04:00
2026-04-28 19:39:37 -04:00
2026-04-28 19:39:37 -04:00
2026-04-28 19:39:37 -04:00
2026-05-17 03:20:33 -04:00
2026-05-18 22:33:23 -04:00
2026-04-24 21:04:38 -04:00
2026-04-20 01:16:12 -04:00
2026-05-18 22:33:23 -04:00
2026-04-20 01:16:12 -04:00
2026-04-16 20:53:53 -04:00