From 0efe2e521416e065e20081bb8277fca93bc5a23f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 23 May 2013 19:06:21 +0200 Subject: [PATCH] Fix creation of internal shipment from order point review837003 (transplanted from b495bb2ca2257cbb8a5f5799fbf8cbf0d0a17785) --- shipment.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shipment.py b/shipment.py index c726e3226e..61de467f16 100644 --- a/shipment.py +++ b/shipment.py @@ -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