-
- Downloads
[FIX] mrp: reserve raw SM with specific lot
On tablet view, if the user selects another lot than the one
reserved, we will still keep a reservation for the old one
To reproduce the issue:
(Need mrp_workorder)
1. Create two products P_finished, P_compo:
- Storable
- Tracked by SN
2. Update on hand quantity of P_compo:
- 1 x SN01
- 1 x SN02
- 1 x SN03
3. Create a BoM:
- Product: P_finished
- Components: 1 x P_compo
- Operations: 1 x a new operation
4. Create, confirm and assign a MO for 2 x P_finished
5. Start the WO
6. Set a finished lot
7. The consumed lot is SN01, set it to SN03
8. Validate the WO
9. Mark WO as done
- Do not close the MO
10. Open the detailed operations of the MO
Error: There is a line that consumes SN03, but there is also a line
for SN01's reservation. This is incorrect, while the MO is not
closed, the quant of SN01 has its available quantity equal to 0.
Since we have to create a backorder, we split all SM. Then, we
remove the excess reservation. To do so, we unreserve the raw SM and
then assign it again. Here is the issue: we run the generic assign
process, so it will not consider that there is already a SML with a
done quantity, i.e.: it will ignore the consumed lot and will just
try to reserve the first one it finds (-> SN01)
OPW-3104930
closes odoo/odoo#110400
Related: odoo/enterprise#36033
Signed-off-by:
Arnold Moyaux (arm) <arm@odoo.com>
Loading