diff --git a/addons/stock/product.py b/addons/stock/product.py index 4ed9d4db2ae..71402d363a4 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -88,7 +88,7 @@ class product_product(osv.osv): wids = warehouse_obj.search(cr, uid, [], context=context) for w in warehouse_obj.browse(cr, uid, wids, context=context): - location_ids.append(w.lot_stock_id.id) + location_ids.append(w.view_location_id.id) operator = context.get('compute_child',True) and 'child_of' or 'in' domain = context.get('force_company', False) and ['&', ('company_id', '=', context['force_company'])] or []