[FIX] stock: wrong variable used in _handle_renaming
Could incorrectly rename the stock.location.path objects, and in case the route has push_ids but no pull_ids would crash the method entirely. closes #10747
This commit is contained in:
parent
e8d06f7b20
commit
d01ecb6e79
|
@ -3620,7 +3620,7 @@ class stock_warehouse(osv.osv):
|
|||
for pull in route.pull_ids:
|
||||
pull_obj.write(cr, uid, pull.id, {'name': pull.name.replace(warehouse.name, name, 1)}, context=context)
|
||||
for push in route.push_ids:
|
||||
push_obj.write(cr, uid, push.id, {'name': pull.name.replace(warehouse.name, name, 1)}, context=context)
|
||||
push_obj.write(cr, uid, push.id, {'name': push.name.replace(warehouse.name, name, 1)}, context=context)
|
||||
#change the mto pull rule name
|
||||
if warehouse.mto_pull_id.id:
|
||||
pull_obj.write(cr, uid, warehouse.mto_pull_id.id, {'name': warehouse.mto_pull_id.name.replace(warehouse.name, name, 1)}, context=context)
|
||||
|
|
Loading…
Reference in New Issue