[FIX] stock: warehouse rename with missing operation types
It wasn't possible to rename a warehouse if one of its picking types (except `In Type`) was not set opw-647815
This commit is contained in:
parent
256978195b
commit
772112e8d0
|
@ -3650,9 +3650,13 @@ class stock_warehouse(osv.osv):
|
|||
self._handle_renaming(cr, uid, warehouse, name, vals.get('code', warehouse.code), context=context_with_inactive)
|
||||
if warehouse.in_type_id:
|
||||
seq_obj.write(cr, uid, warehouse.in_type_id.sequence_id.id, {'name': name + _(' Sequence in'), 'prefix': vals.get('code', warehouse.code) + '\IN\\'}, context=context)
|
||||
if warehouse.out_type_id:
|
||||
seq_obj.write(cr, uid, warehouse.out_type_id.sequence_id.id, {'name': name + _(' Sequence out'), 'prefix': vals.get('code', warehouse.code) + '\OUT\\'}, context=context)
|
||||
if warehouse.pack_type_id:
|
||||
seq_obj.write(cr, uid, warehouse.pack_type_id.sequence_id.id, {'name': name + _(' Sequence packing'), 'prefix': vals.get('code', warehouse.code) + '\PACK\\'}, context=context)
|
||||
if warehouse.pick_type_id:
|
||||
seq_obj.write(cr, uid, warehouse.pick_type_id.sequence_id.id, {'name': name + _(' Sequence picking'), 'prefix': vals.get('code', warehouse.code) + '\PICK\\'}, context=context)
|
||||
if warehouse.int_type_id:
|
||||
seq_obj.write(cr, uid, warehouse.int_type_id.sequence_id.id, {'name': name + _(' Sequence internal'), 'prefix': vals.get('code', warehouse.code) + '\INT\\'}, context=context)
|
||||
if vals.get('resupply_wh_ids') and not vals.get('resupply_route_ids'):
|
||||
for cmd in vals.get('resupply_wh_ids'):
|
||||
|
|
Loading…
Reference in New Issue