changeset d57f046484b8 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=d57f046484b8
description:
Do not pick product at the destination location
It is forbidden to create move with the same source and destination
locations.
To avoid this case, we remove the destination location from the
quantities to
pick.
issue7856
review66541002
diffstat:
move.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r 7a2b29b51d77 -r d57f046484b8 move.py
--- a/move.py Sat Jan 26 01:10:48 2019 +0100
+++ b/move.py Mon Feb 18 18:34:32 2019 +0100
@@ -881,6 +881,8 @@
location_qties[location] = Uom.compute_qty(
move.product.default_uom, pbl[key], move.uom,
round=False)
+ # Prevent to pick from the destination location
+ location_qties.pop(move.to_location, None)
to_pick = move.pick_product(location_qties)