fix(sub12b): to_step_id required → ondelete='restrict'
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user