Add insurance template

This commit is contained in:
2026-04-06 17:30:50 +02:00
parent 845b9cf749
commit ec359f6b8a
12 changed files with 1472 additions and 26 deletions

View File

@@ -198,6 +198,13 @@ class Invoice(metaclass=PoolMeta):
return line.product.description or ''
return ''
@property
def report_product_name(self):
line = self._get_report_trade_line()
if line and line.product:
return line.product.name or ''
return ''
@property
def report_description_upper(self):
if self.lines:
@@ -598,6 +605,15 @@ class InvoiceLine(metaclass=PoolMeta):
return origin.product.description or ''
return ''
@property
def report_product_name(self):
if self.product:
return self.product.name or ''
origin = getattr(self, 'origin', None)
if origin and getattr(origin, 'product', None):
return origin.product.name or ''
return ''
@property
def report_description_upper(self):
return Invoice._clean_report_description(self.description)