From 416de0f6edd7d71bf925d01848eb403ad0df4673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20L=C3=B3pez=20Ram=C3=ADrez?= Date: Thu, 2 Mar 2023 12:31:00 +0100 Subject: [PATCH] Fix multi-tag iban for customer invoices --- .../wizard/account_invoice_import.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/account_invoice_import_facturae/wizard/account_invoice_import.py b/account_invoice_import_facturae/wizard/account_invoice_import.py index 566e69158b4..deaca55bca6 100644 --- a/account_invoice_import_facturae/wizard/account_invoice_import.py +++ b/account_invoice_import_facturae/wizard/account_invoice_import.py @@ -98,7 +98,9 @@ def parse_facturae_invoice(self, xml_root, xsd_file): ] attachments = {} if 'customer' in self.env.context: - acc_number = invoice.find('PaymentDetails/Installment/AccountToBeCredited/AccountNumber').text + account_to_be_credited = invoice.find('PaymentDetails/Installment/AccountToBeCredited/AccountNumber') + account_to_be_debited = invoice.find('PaymentDetails/Installment/AccountToBeDebited/AccountNumber') + acc_number = (account_to_be_debited and account_to_be_debited.text or account_to_be_credited and account_to_be_credited.text) else: acc_number = False res = {