[FIX] wms: fix lookup of xmlid route_warehouse0_buy

Fixes #2610 courtesy of gurneyalex
This commit is contained in:
Cedric Snauwaert 2014-09-23 10:27:42 +02:00
parent 4614fdf755
commit fa561f5caf
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ class stock_warehouse(osv.osv):
route_obj = self.pool.get('stock.location.route')
data_obj = self.pool.get('ir.model.data')
try:
buy_route_id = data_obj.get_object_reference(cr, uid, 'stock', 'route_warehouse0_buy')[1]
buy_route_id = data_obj.get_object_reference(cr, uid, 'purchase', 'route_warehouse0_buy')[1]
except:
buy_route_id = route_obj.search(cr, uid, [('name', 'like', _('Buy'))], context=context)
buy_route_id = buy_route_id and buy_route_id[0] or False