-
- Downloads
[FIX] stock: return packages
Steps to reproduce:
- Deliver an SN-tracked product with the Destination Package set (put in pack button also sets this).
- Return that product without setting the Source Package (you can also click "put in pack" which will put the product in yet another pack).
- This already results in two lines with the same SN in the same location, one with +1.00 and one with -1.00 quantity.
- Deliver that product again and put in pack.
- Now there's three lines with the same SN in the same location, two with +1.00 and one with -1.00 quantity.
Bug:
source Package isn't set bydefault when confirming the move_line
we update the stock quantity for that lot_id and Package set to False
the existing quantity has a Package set so it is filtered out and a new
negative quantity is created
Fix:
set the source Package on the return
opw-3179388
closes odoo/odoo#126308
Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
Showing
- addons/stock/models/stock_move.py 2 additions, 1 deletionaddons/stock/models/stock_move.py
- addons/stock/models/stock_picking.py 3 additions, 3 deletionsaddons/stock/models/stock_picking.py
- addons/stock/tests/test_stock_return_picking.py 53 additions, 0 deletionsaddons/stock/tests/test_stock_return_picking.py
Loading
Please register or sign in to comment