[FIX] product: write active value on all product variants from product template

Issue: When writing active on many products, only change the active value for the last product variants
This commit is contained in:
Christophe Matthieu 2016-01-07 17:12:07 +01:00
parent 96352ae515
commit 231e026936
1 changed files with 1 additions and 1 deletions

View File

@ -776,7 +776,7 @@ class product_template(osv.osv):
ctx.update(active_test=False)
product_ids = []
for product in self.browse(cr, uid, ids, context=ctx):
product_ids = map(int,product.product_variant_ids)
product_ids += map(int, product.product_variant_ids)
self.pool.get("product.product").write(cr, uid, product_ids, {'active': vals.get('active')}, context=ctx)
return res