From ecaa7833afecbdc19183d6f3c22ae07bd049cbde Mon Sep 17 00:00:00 2001 From: Brice bib Bartoletti Date: Thu, 5 Oct 2023 14:49:11 +0200 Subject: [PATCH] [FIX] account_edi_ubl_cii: ubl2.0 import tax retrieving During the work done on OIOUBL einvoice import, we saw that the `Percent` node is always located below a `TaxCategory` node in UBL 2.0. Task-id: 3420748 X-original-commit: 71d8bf93be472bdcf232e25e42f818e2df89cf8b Part-of: odoo/odoo#137758 --- addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py b/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py index e8ebfed1a2d..06de9681cef 100644 --- a/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py +++ b/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py @@ -735,7 +735,7 @@ class AccountEdiXmlUBL20(models.AbstractModel): tax_nodes = tree.findall('.//{*}Item/{*}ClassifiedTaxCategory/{*}Percent') if not tax_nodes: for elem in tree.findall('.//{*}TaxTotal'): - tax_nodes += elem.findall('.//{*}TaxSubtotal/{*}Percent') + tax_nodes += elem.findall('.//{*}TaxSubtotal/{*}TaxCategory/{*}Percent') return self._import_fill_invoice_line_taxes(tax_nodes, invoice_line, inv_line_vals, logs) def _correct_invoice_tax_amount(self, tree, invoice):