Skip to content

Commit

Permalink
Merge PR #7 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by sebastienbeau
  • Loading branch information
github-grap-bot committed Oct 20, 2023
2 parents 83c3da6 + d9dbb9b commit 90cccf4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions perf_product_inactive/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ def write(self, vals):
res = super(
ProductTemplate, self.with_context(skip_create_variant_ids=True)
).write(vals)
if "attribute_line_ids" in vals or (
vals.get("active") and len(self.product_variant_ids) == 0
if (
"attribute_line_ids" in vals
or (vals.get("active") and len(self.product_variant_ids) == 0)
# This adds support for the module product_attribute_variant_rules
# Avoiding the need to create a glue module:
or ("use_attribute_rules" in vals or "product_attribute_rule_ids" in vals)
):
if vals.get("active"):
self = self.with_context(skip_reactivate_variant=False)
Expand Down

0 comments on commit 90cccf4

Please sign in to comment.