[FIX] mrp: trigger scheduler in manufacturing multi steps

Usecase to reproduce:
- Enable multi steps manufacturing (pbm at least)
- Set a RR 0 0 on a component
- Confirm the MO

-> The scheduler is not run for the components

It happens because only the moves raw are confirm and not
the pickings from the procurement group (like in SO)

Part-of: odoo/odoo#75144
This commit is contained in:
Arnold Moyaux
2021-08-26 13:56:22 +00:00
parent 4500a72c1c
commit 8259e3f73e
+2
View File
@@ -1151,6 +1151,8 @@ class MrpProduction(models.Model):
production.workorder_ids._action_confirm()
# run scheduler for moves forecasted to not have enough in stock
self.move_raw_ids._trigger_scheduler()
self.picking_ids.filtered(
lambda p: p.state not in ['cancel', 'done']).action_confirm()
self.state = 'confirmed'
return True