Files
Odoo-Modules/fusion_plating
gsinghpal e37eab9f23 fix(jobs): Sub 13 gate was DEAD due to duplicate button_start
User reproduced on WH/JOB/00342: clicked Start on Incoming Inspection
while Contract Review was still in_progress. Sub 13 should have raised
UserError. It didn't. Both steps ended up in_progress.

Investigation:
  $ grep "def button_start" fusion_plating_jobs/models/fp_job_step.py
  88:    def button_start(self):     ← Sub 13 gate code
  876:   def button_start(self):     ← Policy B + Sub 8 (older)

Two definitions of the same method in the same class. Python uses the
SECOND. My Sub 13 gate at line 88 was dead code from the moment it
landed. WH/JOB/00342's Contract Review and Incoming Inspection both
ran in_progress because the live button_start (line 876) only did
Policy B Contract Review auto-open and Sub 8 Racking auto-open — no
predecessor check.

Fix:
  * Removed the duplicate button_start at line 88 (left a marker
    comment so the next person doesn't redo this footgun)
  * Merged the Sub 13 predecessor gate AND the receiving soft check
    into the line-876 button_start so all four behaviours run from
    one method:
      1. Predecessor gate (raise UserError if blocking)
      2. Contract Review auto-open (route to QA-005)
      3. Racking auto-open (route to inspection)
      4. super().button_start() + receiving check + serial promotion

Helpers _fp_should_block_predecessors / can_start / _compute_can_start
preserved (used by view + Move wizard too).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 22:49:01 -04:00
..
2026-04-20 13:07:15 -04:00
2026-04-26 15:05:17 -04:00
2026-04-28 19:39:37 -04:00
2026-04-16 20:53:53 -04:00
2026-04-28 19:39:37 -04:00
2026-04-28 19:39:37 -04:00
2026-05-01 00:20:40 -04:00
2026-04-29 03:35:33 -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-04-20 01:16:12 -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-04-29 03:35:33 -04:00
2026-04-28 19:39:37 -04:00
2026-04-28 19:39:37 -04:00
2026-04-24 21:04:38 -04:00
2026-04-20 01:16:12 -04:00
2026-04-28 19:39:37 -04:00
2026-04-20 01:16:12 -04:00
2026-04-16 20:53:53 -04:00