Sunday, March 15, 2026
1 change · 19.0
Resolved issues and error corrections
This fixes a manufacturing issue that prevented users from completing production orders when lot-tracked components were consumed during a work operation. The change restores the previous behavior so affected manufacturers are no longer blocked while a more complete solution is considered.
Original PR description
This revert [1] It is currently impossible to process a MO if there is at least one raw SM with tracked component and in manual consumption. Case example: 1. Create two product P_finished, P_compo -…
This revert [1] It is currently impossible to process a MO if there is at least one raw SM with tracked component and in manual consumption. Case example: 1. Create two product P_finished, P_compo - P_compo is tracked by lot 2. Apply an on-hand qty for P_compo 3. Create a BoM with the products - P_compo must be consumed in an operation 4. Create, confirm and produce the MO Error: an error message is displayed and blocks the MO validation: "You need to supply Lot/Serial Number for products and 'consume' them [...]" A raw SM linked to an operation is in manual consumption mode: https://github.com/odoo/odoo/blob/0432a982dfea6e68419f137502c018c0a9241181/addons/mrp/models/stock_move.py#L632-L638 When processing the MO, we first run the `pre_button_mark_done` where we call `_set_quantities`. There, an error in raised if a raw SM tracked and in manual consumption isn't picked: https://github.com/odoo/odoo/blob/6d4d506fdd6496ddcba87fa06411bad7d5bb9b8e/addons/mrp/models/mrp_production.py#L2904-L2909 And here is the issue: before [1], we flagged `picked` before `_set_quantities`, so it was ok. But with the commit, we flag it after. This is the reason why we reach the raised error. Commit [1] was covering an important but not blocking use case. However, the consequence is that some people are now blocked. As a quick reaction, we therefore revert the commit and later will we look for a better possible solution. [1] https://github.com/odoo/odoo/commit/ab432cf77311ba852c59ae8675ad4c2dab3bfdf4 opw-5939156