Use the legal notice of tax as tax exemption reason in UBL invoice

Closes #14572
This commit is contained in:
Cédric Krier
2026-02-04 10:03:48 +01:00
parent 14c2a4435c
commit c260313c23
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -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,