[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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user