Skip to content
Snippets Groups Projects
Commit e2165641 authored by Victor Feyens's avatar Victor Feyens
Browse files

[FIX] product_matrix : templates with one attribute line.


Don't show "Not Available" as Line header when there is only one
attribute line on the product.template.

closes odoo/odoo#35586

Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
parent 1e61522d
Branches
Tags
No related merge requests found
......@@ -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 '- '
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment