diff options
| author | Denis Ledoux <dle@odoo.com> | 2015-02-02 16:07:41 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2015-02-02 16:10:27 +0100 |
| commit | 0c1d73b1bec68f0417856497ae125e069544b965 (patch) | |
| tree | 2eb919084a0137be14bd2c9059b6999a3c5e5634 /addons | |
| parent | 2833d87dfb7996400feaadbd8aaba06a8be7c22f (diff) | |
[FIX] sale: missing context in browse call.
Not passing the context should be exceptional, in almost all cases you should pass it.
In this specific case, not passing it will, for instance,
prevent the use of the key 'active_test' in the context,
and there is therefore no way to count all variants, including disabled ones.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/product/product.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/product/product.py b/addons/product/product.py index 07a42e2408e..a0a6d8f48e0 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -489,7 +489,7 @@ class product_template(osv.osv): def _get_product_variant_count(self, cr, uid, ids, name, arg, context=None): res = {} - for product in self.browse(cr, uid, ids): + for product in self.browse(cr, uid, ids, context=context): res[product.id] = len(product.product_variant_ids) return res |
