Skip to content
Snippets Groups Projects
Commit 9d2d3911 authored by Walid's avatar Walid Committed by Adrien Widart (awt)
Browse files

[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#131358

X-original-commit: eb989688ac2db026077d84a3f55321bc6bf44504
Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
Signed-off-by: default avatarAdrien Widart (awt) <awt@odoo.com>
parent 756101db
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment