-
- Downloads
[FIX] mrp: confirm MO with deleted WO
If there are some dependencies between BoM's operations, a traceback
will appear when the user removes one WO.
Steps to produce:
- From Manufacturing > Configuration: Enable Work Orders.
- Open any Bills of Material.
- In 'Miscellaneous' tab tick the 'Operation Dependencies' boolean.
- Set 3 or more operations in the 'Operations' tab.
- After saving the BOM add 'Blocked By' in the operations.
- Now Create Manufacturing Order for that BOM.
- Delete the one or more workorder(s) from mrp order.
- Now click on the 'Confirm' button, and the error will be raised.
The loop is incorrect because we iterate on the BoM's operations but
the keys of the dict `workorder_per_operation` are based on the MO's
work orders. Therefore, if we remove one WO, the dict will not have
any key for the related operation, hence the traceback.
sentry-4146643254
closes odoo/odoo#120745
Related: odoo/enterprise#41956
Signed-off-by:
Adrien Widart (awt) <awt@odoo.com>
Loading
Please register or sign in to comment