Bugfixes: usage field on location is now type.
This commit is contained in:
1 parent
ba35f54ae9
commit
de977272c4
2 files changed
+7
-7
No files matched your search
@@ -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])
|
||||
|
||||
+2
-2
@@ -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',
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user