details: https://code.tryton.org/tryton/commit/0f8c942cd142
branch: 7.8
user: Cédric Krier <[email protected]>
date: Wed Feb 04 09:53:06 2026 +0100
description:
Use invoice taxes from line to render tax category in UBL Invoice
Closes #14571
(grafted from 7056ce843d67e6db980f5ea7083af3791f5e6f2d)
diffstat:
modules/edocument_ubl/template/2/CreditNote.xml | 2 +-
modules/edocument_ubl/template/2/Invoice.xml | 2 +-
modules/edocument_ubl/tests/test_module.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r e0ff80936825 -r 0f8c942cd142
modules/edocument_ubl/template/2/CreditNote.xml
--- a/modules/edocument_ubl/template/2/CreditNote.xml Sun Feb 01 19:01:49
2026 +0100
+++ b/modules/edocument_ubl/template/2/CreditNote.xml Wed Feb 04 09:53:06
2026 +0100
@@ -106,7 +106,7 @@
</cac:StandardItemIdentification>
</py:with>
</py:if>
- <cac:ClassifiedTaxCategory py:for="tax in line.taxes">
+ <cac:ClassifiedTaxCategory py:for="tax in line.invoice_taxes">
<cbc:ID
py:if="tax.unece_category_code">${tax.unece_category_code}</cbc:ID>
<cbc:Percent py:if="tax.type == 'percentage'">${format((tax.rate *
100).normalize(), 'f')}</cbc:Percent>
<cac:TaxScheme py:if="tax.unece_code">
diff -r e0ff80936825 -r 0f8c942cd142
modules/edocument_ubl/template/2/Invoice.xml
--- a/modules/edocument_ubl/template/2/Invoice.xml Sun Feb 01 19:01:49
2026 +0100
+++ b/modules/edocument_ubl/template/2/Invoice.xml Wed Feb 04 09:53:06
2026 +0100
@@ -106,7 +106,7 @@
</cac:StandardItemIdentification>
</py:with>
</py:if>
- <cac:ClassifiedTaxCategory py:for="tax in line.taxes">
+ <cac:ClassifiedTaxCategory py:for="tax in line.invoice_taxes">
<cbc:ID
py:if="tax.unece_category_code">${tax.unece_category_code}</cbc:ID>
<cbc:Percent py:if="tax.type == 'percentage'">${format((tax.rate *
100).normalize(), 'f')}</cbc:Percent>
<cac:TaxScheme py:if="tax.unece_code">
diff -r e0ff80936825 -r 0f8c942cd142 modules/edocument_ubl/tests/test_module.py
--- a/modules/edocument_ubl/tests/test_module.py Sun Feb 01 19:01:49
2026 +0100
+++ b/modules/edocument_ubl/tests/test_module.py Wed Feb 04 09:53:06
2026 +0100
@@ -98,7 +98,7 @@
unit_price=Decimal('100.0000'),
amount=Decimal('100.00'),
description="Description",
- taxes=[t.tax for t in taxes],
+ invoice_taxes=[t.tax for t in taxes],
)]
invoice = MagicMock(spec=Invoice,
id=-1,