From 6d9b41b3bf0a99e699f7fc0670129120c5c6e1d4 Mon Sep 17 00:00:00 2001 From: "Hiral Patel (OpenERP)" Date: Thu, 31 Jan 2013 15:23:36 +0530 Subject: [PATCH] [IMP] Improve the code bzr revid: hip@tinyerp.com-20130131095336-317ww7oe391tg2wk --- addons/stock/product.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/product.py b/addons/stock/product.py index 1d56ce64988..ba855e0409b 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -235,10 +235,10 @@ 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) + else: + return res # build the list of ids of children of the location given by id if context.get('compute_child',True):