From 6750e1a49a3b366351d2b795ffb896a6fa914f7a Mon Sep 17 00:00:00 2001 From: andrea Date: Fri, 6 Dec 2024 17:55:24 +0100 Subject: [PATCH] [FIX] product_variant_default_code: case of reference_mask is empty --- product_variant_default_code/models/product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product_variant_default_code/models/product.py b/product_variant_default_code/models/product.py index 94ce24873..133445edc 100644 --- a/product_variant_default_code/models/product.py +++ b/product_variant_default_code/models/product.py @@ -227,6 +227,8 @@ def _generate_default_code(self): value_codes ): return None + elif not self.product_tmpl_id.reference_mask: + return None else: product_attrs = defaultdict(str) reference_mask = ReferenceMask(self.product_tmpl_id.reference_mask)