details:   https://code.tryton.org/tryton/commit/7056ce843d67
branch:    default
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
diffstat:

 modules/edocument_ubl/template/2/CreditNote.xml |  4 ++--
 modules/edocument_ubl/template/2/Invoice.xml    |  4 ++--
 modules/edocument_ubl/tests/test_module.py      |  4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diffs (61 lines):

diff -r ed04c2b28dce -r 7056ce843d67 
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
@@ -72,7 +72,7 @@
     </py:with>
     
<cbc:AllowanceChargeReason>${allowance_charge.product.name}</cbc:AllowanceChargeReason>
     <cbc:Amount py:attrs="{'currencyID': 
this.invoice.currency.code}">${abs(allowance_charge.amount)}</cbc:Amount>
-    <cac:TaxCategory py:for="tax in allowance_charge.taxes">
+    <cac:TaxCategory py:for="tax in allowance_charge.invoice_taxes">
         ${TaxCategory(tax)}
     </cac:TaxCategory>
 </cac:AllowanceCharge>
@@ -116,7 +116,7 @@
                 </cac:StandardItemIdentification>
             </py:with>
         </py:if>
-        <cac:ClassifiedTaxCategory py:for="tax in line.taxes">
+        <cac:ClassifiedTaxCategory py:for="tax in line.invoice_taxes">
             ${TaxCategory(tax)}
         </cac:ClassifiedTaxCategory>
     </cac:Item>
diff -r ed04c2b28dce -r 7056ce843d67 
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
@@ -72,7 +72,7 @@
     </py:with>
     
<cbc:AllowanceChargeReason>${allowance_charge.product.name}</cbc:AllowanceChargeReason>
     <cbc:Amount py:attrs="{'currencyID': 
this.invoice.currency.code}">${abs(allowance_charge.amount)}</cbc:Amount>
-    <cac:TaxCategory py:for="tax in allowance_charge.taxes">
+    <cac:TaxCategory py:for="tax in allowance_charge.invoice_taxes">
         ${TaxCategory(tax)}
     </cac:TaxCategory>
 </cac:AllowanceCharge>
@@ -116,7 +116,7 @@
                 </cac:StandardItemIdentification>
             </py:with>
         </py:if>
-        <cac:ClassifiedTaxCategory py:for="tax in line.taxes">
+        <cac:ClassifiedTaxCategory py:for="tax in line.invoice_taxes">
             ${TaxCategory(tax)}
         </cac:ClassifiedTaxCategory>
     </cac:Item>
diff -r ed04c2b28dce -r 7056ce843d67 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
@@ -104,13 +104,13 @@
             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],
             ), Mock(spec=Invoice,
             type='line',
             product=charge,
             quantity=1,
             amount=Decimal('5.00'),
-            taxes=[t.tax for t in taxes],
+            invoice_taxes=[t.tax for t in taxes],
             )]
     invoice = MagicMock(spec=Invoice,
         id=-1,

Reply via email to