openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #06461
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-777121-rha into lp:openobject-addons
Rifakat Haradwala (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-777121-rha into lp:openobject-addons.
Requested reviews:
Rucha (Open ERP) (rpa-openerp)
Related bugs:
Bug #777121 in OpenERP Addons: "[6.0.2][stock] stock location list is slow because it always compute stock levels even if field is hidden; patch included"
https://bugs.launchpad.net/openobject-addons/+bug/777121
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-777121-rha/+merge/60356
lp:777121 stock: stock location list is slow because it always compute stock levels even if field is hidden
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-777121-rha/+merge/60356
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-777121-rha.
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-05-05 05:46:31 +0000
+++ stock/stock.py 2011-05-09 10:42:31 +0000
@@ -113,6 +113,9 @@
"""
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), ))
Follow ups