-
- Downloads
[FIX] stock: redundant move line on _set_quantity_done
Usecase to repdoduce:
BOM 1 final product F - 2 components C
- Create a MO of 2 units F
- Do not reserve
- Produce 1 units twice
You have 1 finished line with 0 quantity and another with 2 quantity.
It happens because _set_quantity_done expect reservation on
move line. It checks the reservation - quantity done on a move line
as quantity to add. Since you have no reservation in will result as
- quantity done and it will remove the quantity done on existing line.
Then it removes the quantity done added on move line on the total
quantity to add passed as an argument. It results as
qty_to_consume -(-move line quanity done). At the end of the method it
creates a new move line with the remaining quantity to consume (on which
was added the quantity done of not reserved move line).
Skip the move line update if the quantity reserved - quantity done is
negative.
closes odoo/odoo#31805
Signed-off-by:
Arnold Moyaux <amoyaux@users.noreply.github.com>
Loading
Please register or sign in to comment