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
This commit is contained in:
@@ -881,6 +881,8 @@ class Move(Workflow, ModelSQL, ModelView):
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user