[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:
parent
96352ae515
commit
231e026936
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue