Add insurance template
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user