feat(jobs+receiving): confirm->receive flow, lock recipe, reset step, lock steps, fix bake gate
- Confirm->Receive (A): after a single interactive SO confirm, receiving's action_confirm returns action_view_receiving() so the user lands straight on the Receive Parts screen (opt-out via fp_no_receiving_redirect context). - Lock recipe (1): recipe_id readonly on the WO form — stick to the order-entry recipe. - Hide spec (2): customer_spec_id invisible on the WO form. - Reset step (3): new fp.job.step.button_reset (operator-usable, audited) + an undo button next to Start. Resets to Ready, clears finish + sign-off, closes open timelogs, keeps start audit + move/CoC history. - Lock steps (4): steps list create=false delete=false (no Add a line / no trash) — steps come from the recipe, only skippable, never deleted. - Bake gate fix (5): _fp_missing_required_step_inputs now honours the node's collect_measurements master switch, matching the Record-Inputs wizard. collect_measurements=False + required prompts no longer blocks finish (wizard shows 0 rows, so the gate must too). Unblocks WO-30098 + 63 other affected nodes (bake steps). Deployed + verified on entech (-u jobs; bake finishes, reset done->ready, recipe readonly, spec hidden, steps locked, receiving redirect target OK). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -74,6 +74,15 @@ class SaleOrder(models.Model):
|
||||
'expected_qty': int(total_qty),
|
||||
'line_ids': line_vals,
|
||||
})
|
||||
# Seamless flow: after a single interactive confirm, jump straight
|
||||
# to the Receive Parts screen so the dock counts parts in right away
|
||||
# (idiot-proof — no hunting for the smart button). Guarded to a
|
||||
# single order + an opt-out context flag so batch / programmatic
|
||||
# confirms (and tests) keep the native return value.
|
||||
if (len(self) == 1
|
||||
and not self.env.context.get('fp_no_receiving_redirect')
|
||||
and self.x_fc_receiving_ids):
|
||||
return self.action_view_receiving()
|
||||
return res
|
||||
|
||||
def action_view_receiving(self):
|
||||
|
||||
Reference in New Issue
Block a user