[FIX] product: wrong target on computed method

As in an api.multi call, should target template, not self.
Fixes traceback prone computed field
This commit is contained in:
Mansi Trivedi
2016-02-05 13:47:49 +01:00
committed by Martin Trigaux
parent a5b3c6e748
commit 9931234e83
@@ -22,7 +22,7 @@ class ProductTemplate(models.Model):
def _compute_rules_count(self):
for template in self:
self.rules_count = sum([p.rules_count for p in template.product_variant_ids])
template.rules_count = sum([p.rules_count for p in template.product_variant_ids])
@api.multi
def action_view_rules(self):