From fc32fd83f9b9615ceca0422bc255fce20ad2b727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 12 Mar 2013 10:36:37 +0100 Subject: [PATCH] Use instance in shipments review708002 --- location.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/location.py b/location.py index 880d84a51b..ff4980543c 100644 --- a/location.py +++ b/location.py @@ -51,13 +51,13 @@ class ShipmentIn: @classmethod def _get_inventory_moves(cls, incoming_move): - res = super(ShipmentIn, cls)._get_inventory_moves(incoming_move) + move = super(ShipmentIn, cls)._get_inventory_moves(incoming_move) for product_location in incoming_move.product.locations: if product_location.warehouse.id != \ incoming_move.shipment_in.warehouse.id: continue - res['to_location'] = product_location.location.id - return res + move.to_location = product_location.location + return move class ShipmentOutReturn: @@ -65,9 +65,10 @@ class ShipmentOutReturn: @classmethod def _get_inventory_moves(cls, incoming_move): - res = super(ShipmentOutReturn, cls)._get_inventory_moves(incoming_move) + move = super(ShipmentOutReturn, cls)._get_inventory_moves( + incoming_move) for product_location in incoming_move.product.locations: if (product_location.warehouse == incoming_move.shipment_out_return.warehouse): - res['to_location'] = product_location.location.id - return res + move.to_location = product_location.location + return move