fixed bug

bzr revid: hmo@tinyerp.com-20081010145659-f52i8be3dhfptk83
This commit is contained in:
Harshad Modi
2008-10-10 20:26:59 +05:30
parent 7df75ba034
commit cb5f16bd17
+3 -2
View File
@@ -69,10 +69,11 @@ class product_product(osv.osv):
location_ids = context['location']
else:
cr.execute("select lot_stock_id from stock_warehouse")
location_ids = [id for (id,) in cr.fetchall()]
location_ids = [id for (id,) in cr.fetchall()]
# build the list of ids of children of the location given by id
location_ids = self.pool.get('stock.location').search(cr, uid, [('location_id', 'child_of', location_ids)])
child_location_ids = self.pool.get('stock.location').search(cr, uid, [('location_id', 'child_of', location_ids)])
location_ids= len(child_location_ids) and child_location_ids or location_ids
states_str = ','.join(map(lambda s: "'%s'" % s, states))