feat(jobs): Sub 13 sequential step enforcement + Sub 12e v3 wizard
Two coherent feature drops shipping together because their fp_job_step
edits overlap. Both target operator workflow correctness.
## Sub 13 — Sequential step enforcement (recipe + per-step)
Background:
Investigation on WH/JOB/00339 showed operators starting Incoming
Inspection while Contract Review was still in_progress. Audit:
98.7% of recipe operations system-wide had requires_predecessor_done
= false (the legacy per-step opt-in defaults off, recipe authors
rarely tick the box).
Architecture:
Recipe-level toggle + per-step opt-out (Option A from /investigate).
* fusion.plating.process.node.enforce_sequential — Boolean on the
recipe root. Default True. When True, every operation under this
recipe waits for earlier-sequence steps to finish before it can
start.
* fusion.plating.process.node.parallel_start — Boolean on operation
nodes. When True, this step bypasses the sequential gate (e.g.
paperwork or QA review that runs alongside production).
* Mirrored on fp.step.template (parallel_start) so library steps
carry the flag into snapshots.
* fp.job.enforce_sequential — related from recipe_id. Snapshotted
at job creation so a recipe author flipping the recipe's flag
AFTER job generation does NOT change behaviour mid-run.
* fp.job.step.parallel_start — related from recipe_node_id.
* Decision matrix (encapsulated in
fp.job.step._fp_should_block_predecessors):
recipe.enforce_sequential | step.parallel_start | step.req_pred_done | block?
--------------------------|---------------------|--------------------|------
True | False | any | YES
True | True | any | no
False | any | True | YES
False | any | False | no
* Manager bypass via context fp_skip_predecessor_check=True (existing).
Runtime gates:
* fp.job.step.button_start — calls _fp_should_block_predecessors;
raises UserError naming the blocking earlier step(s).
* fp.job.step.can_start — computed Boolean for view-side disable.
* Move wizard predecessor check
(fusion_plating_shopfloor/controllers/move_controller.py) — uses
the same helper so tablet + backend behave identically.
UI surface:
* Recipe form (fp_process_node_views.xml) — enforce_sequential
toggle on recipe root, parallel_start checkbox on operations.
* Step template form — parallel_start checkbox.
* Simple Recipe Editor (inline library form) — Parallel Start
checkbox + legacy flag demoted with muted styling + supervisor
group gate.
* Recipe Tree Editor (properties panel) — both flags exposed,
only-show on the right node_type.
* Controllers updated to allowlist + payload the new fields.
Migration:
fusion_plating/migrations/19.0.18.12.0/post-migrate.py — sets
enforce_sequential = TRUE on every existing recipe-root node.
Idempotent. User confirmed dev-stage data, so retroactive flip
is safe (no production jobs to disrupt).
Tests:
TestSequentialEnforcement (10 tests) covering:
* sequential mode blocks out-of-order start
* first step always startable
* predecessor finish/skip unlocks next
* parallel_start opts out of gate
* free-flow mode bypasses gate
* legacy requires_predecessor_done still honoured in free-flow
* manager bypass via context
* can_start compute reflects state correctly
* library template parallel_start snapshots into recipe-node
## Sub 12e — Record Inputs Wizard v3 (card layout, dark-mode aware)
Background:
v2 wizard was a 17-column wide editable table. Operators got lost
finding which value column applied to their row's type, horizontal
scroll required on tablets, composite types crammed into one row.
New layout:
* Each measurement renders as a stacked card (CSS Grid + display
transformation on the existing list widget — preserves inline
editing, no JS rewrite).
* Card header: prompt name (large, bold) + type/unit pills.
* Card body: ONLY the value widget for this row's type
(number / boolean / date / text / photo / multi-point / panel).
* Composite types (multi-point thickness 5x reading + avg, bath
panel 4 fields) get inline sub-grid inside the card.
* Empty state ("no measurement prompts") with friendly CTA.
Dark mode:
* SCSS branches at compile time on $o-webclient-color-scheme
(per fusion-plating/CLAUDE.md note).
* Tokens: 7 surface colours + 4 ink levels with light/dark hex
pairs, all behind var(--fp-*) custom properties for per-deploy
override.
* Registered in BOTH web.assets_backend AND web.assets_web_dark
so each bundle compiles its own palette.
Tablet polish:
@media (max-width: 900px) — collapse meta below prompt + bump
numeric input min-height to 56px.
Defensive:
* v2 view kept in the XML file (instant rollback by changing one
view_id ref).
* `:has(.o_invisible_modifier)` rule drops empty cells out of the
grid so Odoo's invisible="..." doesn't punch holes in layout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -268,6 +268,9 @@ export class RecipeTreeEditor extends Component {
|
||||
customer_visible: node.customer_visible,
|
||||
is_manual: node.is_manual,
|
||||
requires_signoff: node.requires_signoff,
|
||||
// Sub 13 — sequential enforcement
|
||||
enforce_sequential: !!node.enforce_sequential,
|
||||
parallel_start: !!node.parallel_start,
|
||||
};
|
||||
const result = await rpc("/fp/recipe/node/write", {
|
||||
node_id: node.id,
|
||||
|
||||
@@ -241,6 +241,7 @@ export class FpSimpleRecipeEditor extends Component {
|
||||
description: "",
|
||||
requires_signoff: false,
|
||||
requires_predecessor_done: false,
|
||||
parallel_start: false, // Sub 13 — per-step opt-out
|
||||
requires_rack_assignment: false,
|
||||
requires_transition_form: false,
|
||||
tank_ids: [],
|
||||
@@ -289,6 +290,7 @@ export class FpSimpleRecipeEditor extends Component {
|
||||
description: ed.description,
|
||||
requires_signoff: !!ed.requires_signoff,
|
||||
requires_predecessor_done: !!ed.requires_predecessor_done,
|
||||
parallel_start: !!ed.parallel_start,
|
||||
requires_rack_assignment: !!ed.requires_rack_assignment,
|
||||
requires_transition_form: !!ed.requires_transition_form,
|
||||
tank_ids: (ed.tank_ids || []).map((t) => t.id),
|
||||
|
||||
@@ -350,6 +350,28 @@
|
||||
t-on-change="(ev) => { state.selectedNode.customer_visible = ev.target.checked; }"/>
|
||||
<label class="form-check-label" for="fp_re_chk_visible">Customer visible</label>
|
||||
</div>
|
||||
<!-- Sub 13 — sequential enforcement (recipe root) -->
|
||||
<div class="form-check"
|
||||
t-if="state.selectedNode.node_type === 'recipe'">
|
||||
<input type="checkbox" class="form-check-input" id="fp_re_chk_seq"
|
||||
t-att-checked="state.selectedNode.enforce_sequential"
|
||||
t-on-change="(ev) => { state.selectedNode.enforce_sequential = ev.target.checked; }"/>
|
||||
<label class="form-check-label" for="fp_re_chk_seq"
|
||||
title="When ON (the default), every operation under this recipe waits for earlier-sequence steps to finish before it can start. Mark a specific step as Parallel Start to opt that one out.">
|
||||
Enforce Sequential Order
|
||||
</label>
|
||||
</div>
|
||||
<!-- Sub 13 — per-step opt-out (operation/step nodes) -->
|
||||
<div class="form-check"
|
||||
t-if="state.selectedNode.node_type === 'operation' or state.selectedNode.node_type === 'step'">
|
||||
<input type="checkbox" class="form-check-input" id="fp_re_chk_par"
|
||||
t-att-checked="state.selectedNode.parallel_start"
|
||||
t-on-change="(ev) => { state.selectedNode.parallel_start = ev.target.checked; }"/>
|
||||
<label class="form-check-label" for="fp_re_chk_par"
|
||||
title="When the parent recipe is Sequential, ticking this lets the step start while earlier-sequence steps are still in progress.">
|
||||
Parallel Start
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="o_fp_re_field">
|
||||
|
||||
@@ -412,10 +412,16 @@
|
||||
t-model="state.libraryEditor.requires_signoff"/>
|
||||
Require QA Sign-off
|
||||
</label>
|
||||
<label>
|
||||
<label title="Sub 13. When this template lands inside a sequential recipe, the step can start while earlier-sequence steps are still in progress. Use for paperwork or QA review steps that don't need previous step done.">
|
||||
<input type="checkbox"
|
||||
t-model="state.libraryEditor.parallel_start"/>
|
||||
Parallel Start
|
||||
</label>
|
||||
<label title="Legacy. Only fires when the parent recipe is in Free-Flow mode (Enforce Sequential = False)."
|
||||
class="text-muted">
|
||||
<input type="checkbox"
|
||||
t-model="state.libraryEditor.requires_predecessor_done"/>
|
||||
Require Predecessor Done
|
||||
Require Predecessor Done <em>(legacy)</em>
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox"
|
||||
|
||||
Reference in New Issue
Block a user