[FIX] stock: stock location list is slow because it always compute stock levels even if field is hidden
lp bug: https://launchpad.net/bugs/777121 fixed bzr revid: rha@tinyerp.com-20110509102917-oppf7jr26e5w1xob
This commit is contained in:
committed by
Rifakat Haradwala (Open ERP)
commit
6d9b1a6f6f
@@ -113,6 +113,9 @@ class stock_location(osv.osv):
|
||||
"""
|
||||
prod_id = context and context.get('product_id', False)
|
||||
|
||||
if not prod_id:
|
||||
return dict([(i, {}.fromkeys(field_names, 0.0)) for i in ids])
|
||||
|
||||
product_product_obj = self.pool.get('product.product')
|
||||
|
||||
cr.execute('select distinct product_id, location_id from stock_move where location_id in %s', (tuple(ids), ))
|
||||
|
||||
Reference in New Issue
Block a user