[IMP] do not crash if no warehouse

bzr revid: fp@openerp.com-20130224101111-zz5n34c5fmr4n8jt
This commit is contained in:
Fabien Pinckaers
2013-02-24 11:11:11 +01:00
+2
View File
@@ -235,6 +235,8 @@ class product_product(osv.osv):
else:
location_ids = []
wids = warehouse_obj.search(cr, uid, [], context=context)
if not wids:
return res
for w in warehouse_obj.browse(cr, uid, wids, context=context):
location_ids.append(w.lot_stock_id.id)