[FIX] mrp: remove workorder_ids on removing bom_id
Method `_onchange_workorder_ids` will create workorder_ids for the the selected bom but it was not re-setting it on removing BoM. It was causing issue on `_action_confirm` as Bom for the selected WO will not be found. closes odoo/odoo#69662 Fixes: #68261 X-original-commit: 13832912daafad7c472d7414eaacede9e302e787 Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
This commit is contained in:
@@ -671,6 +671,8 @@ class MrpProduction(models.Model):
|
||||
def _onchange_workorder_ids(self):
|
||||
if self.bom_id:
|
||||
self._create_workorder()
|
||||
else:
|
||||
self.workorder_ids = False
|
||||
|
||||
def write(self, vals):
|
||||
if 'workorder_ids' in self:
|
||||
|
||||
Reference in New Issue
Block a user