[FIX] mrp: reference to enterprise variable
Usecase to reproduce: - Create 2 table(MTO) - Produce 1 and use BO button Traceback due to a reference to enterprise field. closes odoo/odoo#53077 X-original-commit: 2fffc12f8e3cdccba4b1c9820f997f4b10dac330 Related: odoo/enterprise#11191 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit is contained in:
@@ -1373,9 +1373,7 @@ class MrpProduction(models.Model):
|
||||
for workorder in backorder_mo.workorder_ids:
|
||||
workorder.duration_expected = workorder.duration_expected * (1 - ratio)
|
||||
backorders.action_confirm()
|
||||
for wo in backorders.workorder_ids:
|
||||
if wo.component_id:
|
||||
wo._update_component_quantity()
|
||||
|
||||
# Remove the serial move line without reserved quantity. Post inventory will assigned all the non done moves
|
||||
# So those move lines are duplicated.
|
||||
backorders.move_raw_ids.move_line_ids.filtered(lambda ml: ml.product_id.tracking == 'serial' and ml.product_qty == 0).unlink()
|
||||
|
||||
Reference in New Issue
Block a user