diff --git a/modules/edocument_ubl/edocument.py b/modules/edocument_ubl/edocument.py index 9f5cd29148..13718613f0 100644 --- a/modules/edocument_ubl/edocument.py +++ b/modules/edocument_ubl/edocument.py @@ -190,14 +190,16 @@ class Invoice(Model): def taxes(self): class Tax(namedtuple( 'Tax', - ('type', 'rate', 'unece_category_code', 'unece_code'))): + ('type', 'rate', 'unece_category_code', 'unece_code', + 'legal_notice'))): @classmethod def from_line(cls, line): return Tax( type=line.tax.type, rate=line.tax.rate, unece_category_code=line.tax.unece_category_code, - unece_code=line.tax.unece_code) + unece_code=line.tax.unece_code, + legal_notice=line.legal_notice or '') TaxLine = namedtuple('TaxLine', ('base', 'amount', 'tax')) for group, lines in groupby(sorted( self.invoice.taxes, diff --git a/modules/edocument_ubl/template/2/base.xml b/modules/edocument_ubl/template/2/base.xml index bb14b39e8c..c94dceaf95 100644 --- a/modules/edocument_ubl/template/2/base.xml +++ b/modules/edocument_ubl/template/2/base.xml @@ -84,6 +84,7 @@ this repository contains the full copyright notices and license terms. --> ${tax.unece_category_code} ${format((tax.rate * 100).normalize(), 'f')} + ${tax.legal_notice} ${tax.unece_code}