gsinghpal 7c31269691 fix(simple-editor): stop seed resurrection + add promote/demote + drag substeps
Three bugs reported on 2026-05-20:

1. RESURRECTION. User deletes a substep in the Simple Editor (e.g.
   Soak Clean (S-3) under Cleaner), then on the next -u fusion_plating
   the substep comes back. Root cause: the recipe XML lived in the
   manifest's `data` list with `noupdate="1"`. Odoo's noupdate=1 only
   blocks UPDATE of existing records — when a record's ir.model.data
   row is missing, the loader treats it as "not yet created" and
   re-creates from XML. Every upgrade resurrected every user-deleted
   seed node.

   Fix: pull the recipe XML files out of `data` and load them once
   via post_init_hook → _seed_starter_recipes_once. Sentinel checks
   ir.model.data for each recipe's root xmlid; if present, skip
   loading entirely. Result: deletions are permanent across all
   future upgrades. Existing entech recipes untouched.

   Files affected: fp_recipe_enp_alum_basic, fp_recipe_enp_steel_basic,
   fp_recipe_enp_sp, fp_recipe_general_processing, fp_recipe_anodize,
   fp_recipe_chem_conversion.

2. PROMOTE / DEMOTE. Simple Editor had no way to turn a substep into
   a top-level operation, or to tuck an operation under another as a
   substep. Authors had to delete + re-create. New endpoints:

   * /fp/simple_recipe/step/promote → flips node_type 'step' →
     'operation', re-parents to the recipe (or sub-process) root,
     places right after the old parent operation.
   * /fp/simple_recipe/step/demote → flips 'operation' → 'step',
     re-parents under the preceding operation (or a caller-supplied
     target_op_id). Blocks demoting an operation that has its own
     children, with a helpful message.

   UI: each row in the editor now carries an up-arrow (promote, only
   shown on substeps) and a down-arrow (demote, only shown on
   operations). Confirmation dialog explains what's about to happen.

3. DRAG SUBSTEPS. Last commit (2142a66b) disabled drag on substep
   rows. Operators couldn't reorder substeps within an operation.
   Re-enabled drag on substeps. The step_reorder endpoint now groups
   incoming node_ids by parent_id and renumbers within each parent
   (10, 20, 30…). Cross-parent drag still no-ops on parent change —
   Promote/Demote buttons are the way to move between parents.

Drive-by:
- Added `from odoo import _` to the controller (missing import the
  new endpoints surfaced).
- Edit-panel field wiring audited: all fields visible in the screen
  (Step name, Default instructions, Step Type, Triggers Workflow,
  Parallel Start, QA Sign-off, Collect measurements, Instruction
  Images, custom prompts) persist correctly through step_write or
  dedicated endpoints. No broken wires.

Tests: 15 total in TestSimpleRecipeFlatten (was 10). 5 new cover
promote happy-path, promote reject (non-substep), demote happy-path,
demote block on has_children, and reorder parent-scoping.

Module: fusion_plating 19.0.20.4.0 → 19.0.20.5.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 22:53:09 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-05-16 13:18:52 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-29 03:35:33 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-05-10 10:25:12 -04:00
2026-05-04 02:17:47 -04:00
2026-04-24 21:04:38 -04:00
2026-04-28 19:39:37 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-29 03:35:33 -04:00
2026-04-30 18:08:36 -04:00
2026-05-11 03:20:31 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-05-18 22:33:23 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-05-12 09:08:34 -04:00
2026-04-24 21:04:38 -04:00
2026-05-13 08:17:35 -04:00
2026-05-18 22:33:23 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-05-16 13:07:50 -04:00
2026-04-24 21:04:38 -04:00
2026-05-16 13:18:52 -04:00
2026-02-22 01:22:18 -05:00
2026-05-10 10:25:12 -04:00
2026-04-12 09:11:35 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-12 09:11:35 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
Description
Odoo 19 custom modules
213 MiB
Languages
Python 56.4%
HTML 25.7%
JavaScript 14.7%
SCSS 1.9%
CSS 0.8%
Other 0.4%