From 84ffe701ac4a2887816223d7a1de48657f6a1d3a Mon Sep 17 00:00:00 2001 From: Gil Arasa Verge Date: Sat, 2 Nov 2024 13:48:58 +0100 Subject: [PATCH] [FIX] product_variant_default_code ir.config_parameter --- product_variant_default_code/models/product.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/product_variant_default_code/models/product.py b/product_variant_default_code/models/product.py index 110b25699..698b0a823 100644 --- a/product_variant_default_code/models/product.py +++ b/product_variant_default_code/models/product.py @@ -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 )