From de977272c4f02307daaf033eac1ad9cc5bc511b5 Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Thu, 24 Apr 2008 16:02:03 +0200 Subject: [PATCH] Bugfixes: usage field on location is now type. --- move.py | 10 +++++----- packing.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/move.py b/move.py index 49bb261e62..3daf7cdbd5 100644 --- a/move.py +++ b/move.py @@ -68,8 +68,8 @@ class Move(OSV): if move.incoming_packing_in.warehouse.input_location.id \ != move.to_location.id: return False - if move.from_location.usage and \ - move.from_location.usage not in ('supplier', 'customer'): + if move.from_location.type and \ + move.from_location.type not in ('supplier', 'customer'): return False for packing_move in move.incoming_packing_in.incoming_moves: if packing_move.from_location.id != move.from_location.id: @@ -86,8 +86,8 @@ class Move(OSV): if move.outgoing_packing_out.warehouse.output_location.id \ != move.from_location.id: return False - if move.to_location.usage and \ - move.to_location.usage not in ('supplier','customer'): + if move.to_location.type and \ + move.to_location.type not in ('supplier','customer'): return False for packing_move in move.outgoing_packing_out.outgoing_moves: if packing_move.to_location.id != move.to_location.id: @@ -229,7 +229,7 @@ class CreatePacking(Wizard): cursor, user, [('input_location', 'in', [l for l in moves_by_location]), - ('usage','=','warehouse')]) + ('type','=','warehouse')], context=context) wh_locations = location_obj.browse( cursor, user, warehouse_ids, context=context) loc2wh = dict([( whl.input_location.id, whl.id) for whl in wh_locations]) diff --git a/packing.py b/packing.py index 0bf1514c80..984e41f848 100644 --- a/packing.py +++ b/packing.py @@ -123,7 +123,7 @@ class PackingIn(OSV): 'uom': uom, 'quantity': quantity, 'from_location':location, - 'to_location': packing.warehouse.store_location.id, + 'to_location': packing.warehouse.storage_location.id, 'inventory_packing_in': packing.id, 'state': 'waiting', } @@ -354,7 +354,7 @@ class PackingOut(OSV): 'uom': uom, 'quantity': quantity, 'from_location': packing.warehouse.output_location.id, - 'to_location': packing.warehouse.store_location.id, + 'to_location': packing.warehouse.storage_location.id, 'inventory_packing_out': packing.id, 'state': 'waiting', }