Fix creation of internal shipment from order point

review837003
(transplanted from b495bb2ca2257cbb8a5f5799fbf8cbf0d0a17785)
This commit is contained in:
Cédric Krier committed 2013-05-23 19:06:21 +02:00
1 parent f2756d6153
commit 0efe2e5214
1 file changed
+4 -4
+4 -4
View File
@@ -54,8 +54,8 @@ class ShipmentInternal(ModelSQL, ModelView):
for op in order_points:
qty = pbl.get((op.storage_location.id, op.product.id), 0)
if qty < op.min_quantity:
key = (op.storage_location.id,
op.provisioning_location.id,
key = (op.provisioning_location.id,
op.storage_location.id,
op.product.id)
moves[key] = op.max_quantity - qty
@@ -69,8 +69,8 @@ class ShipmentInternal(ModelSQL, ModelView):
])
for shipment in self.browse(shipment_ids):
for move in shipment.moves:
key = (shipment.to_location.id,
shipment.from_location.id,
key = (shipment.from_location.id,
shipment.to_location.id,
move.product.id)
if key not in moves:
continue