-
- Downloads
[FIX] stock: allow to validate a picking with 2 extra moves
Use case to reproduce: - Create a picking containing 2 moves that have a quantity_done greater than reserved quantity - Validate the picking with or without backorder Traceback due to a record that do not exist anymore. It happens due to 2 functionality that have a wrong behavior when used together: - merge_move function that will try to merge moves with same characteristics inside a same picking. - action_done functionality that will create an extra move if the quantity done for a move is greater than reserved quantity. (the extra move is used in order to propagate changes) With our usecase: - MOVE A, reserved_qty: 10, qty_done: 20 - MOVE B, reserved_qty: 10, qty_done: 15 action_done on move A will create a new move thus we will have - MOVE A, reserved_qty: 10, qty_done: 20 - A bis, reserved_qty: 10, qty_done: 0 - MOVE B, reserved_qty: 10, qty_done: 15 then merge move will not only merge move A and A bis but will also merge B which result with inconsenstencies and traceback since system will try to process move B after A - MOVE A,A',B reserved_qty:30, qty_done:35 (the 5 extra qty is not propagated) This commit adds a kwarg in action_confirm that is propagated to merge_move this kwargs is a record set taht will limit the moves that can be used for the merge in order to merge extra move in original move opw-1825264
Showing
- addons/mrp/models/stock_move.py 2 additions, 2 deletionsaddons/mrp/models/stock_move.py
- addons/sale_stock/models/stock.py 1 addition, 1 deletionaddons/sale_stock/models/stock.py
- addons/stock/models/stock_move.py 22 additions, 9 deletionsaddons/stock/models/stock_move.py
- addons/stock/tests/test_move2.py 44 additions, 0 deletionsaddons/stock/tests/test_move2.py
Loading
Please register or sign in to comment