Use all moves from internal shipment to compute incoming

In request and draft state, the outgoing moves are not yet filled.

issue11745
This commit is contained in:
Cédric Krier committed 2022-10-11 22:48:36 +02:00
1 parent 61f2d037b9
commit b492c982f2
1 file changed
+3 -2
+3 -2
View File
@@ -472,8 +472,9 @@ class QuantityEarlyPlan(Workflow, ModelSQL, ModelView):
shipment = self.origin
if (shipment.to_location.warehouse == warehouse
or shipment.from_location.warehouse != warehouse):
for move in shipment.outgoing_moves:
yield move.product, move.internal_quantity
for move in shipment.moves:
if move.to_location.warehouse == warehouse:
yield move.product, move.internal_quantity
@classmethod
def _pick_incoming(cls, quantity, plans):