diff --git a/addons/product_matrix/models/product_template.py b/addons/product_matrix/models/product_template.py index 64b164e51e6..60fccea14a3 100644 --- a/addons/product_matrix/models/product_template.py +++ b/addons/product_matrix/models/product_template.py @@ -75,8 +75,8 @@ class ProductTemplateAttributeValue(models.Model): :rtype: dict """ header_cell = { - 'name': '-'.join([attr.name for attr in self]) - } + 'name': '-'.join([attr.name for attr in self]) if self else " " + } # The " " is to avoid having 'Not available' if the template has only one attribute line. extra_price = sum(self.mapped('price_extra')) if display_extra else 0 if extra_price: sign = '+ ' if self.price_extra > 0 else '- '