[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.
This commit is contained in:
Denis Ledoux 2015-02-02 16:07:41 +01:00
parent 2833d87dfb
commit 0c1d73b1be
1 changed files with 1 additions and 1 deletions

View File

@ -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