From e718a47e3ec598a1c91e4894560cf6539740a948 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Mon, 27 Apr 2026 21:19:58 -0400 Subject: [PATCH] =?UTF-8?q?fix(sub12b):=20to=5Fstep=5Fid=20required=20?= =?UTF-8?q?=E2=86=92=20ondelete=3D'restrict'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Odoo 19 disallows ondelete='set null' on a required M2O. Switched to restrict — destination steps can't be unlinked while move-log rows reference them, which is the right audit-safety behavior anyway. Co-Authored-By: Claude Opus 4.7 (1M context) --- fusion_plating/fusion_plating/models/fp_job_step_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fusion_plating/fusion_plating/models/fp_job_step_move.py b/fusion_plating/fusion_plating/models/fp_job_step_move.py index d9b41347..c4f2aa48 100644 --- a/fusion_plating/fusion_plating/models/fp_job_step_move.py +++ b/fusion_plating/fusion_plating/models/fp_job_step_move.py @@ -29,7 +29,7 @@ class FpJobStepMove(models.Model): from_step_id = fields.Many2one('fp.job.step', string='From Step', ondelete='set null', index=True) to_step_id = fields.Many2one('fp.job.step', string='To Step', - ondelete='set null', index=True, required=True) + ondelete='restrict', index=True, required=True) from_tank_id = fields.Many2one('fusion.plating.tank', related='from_step_id.tank_id', store=True) to_tank_id = fields.Many2one('fusion.plating.tank', string='To Tank',