Skip to content

Commit

Permalink
[FIX] product_variant_default_code ir.config_parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
giarve committed Nov 2, 2024
1 parent 1034370 commit 84ffe70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion product_variant_default_code/models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ def _guess_main_lang(self):
)
def _compute_default_code(self):
super()._compute_default_code()
if self.env["ir.config_parameter"].get_param("prefix_as_default_code"):
if self.env["ir.config_parameter"].get_param(
"product_variant_default_code.prefix_as_default_code"
):
unique_variants = self.filtered(
lambda template: len(template.product_variant_ids) == 1
)
Expand Down

0 comments on commit 84ffe70

Please sign in to comment.