From 3b338cc68775575683749995b80bc0493f330c3e Mon Sep 17 00:00:00 2001 From: Thomas Beckers Date: Mon, 7 Jun 2021 13:39:47 +0000 Subject: [PATCH] [FIX] l10n_it_edi: some vendor credit note fail import from xml When importing vendor credit note from an italian e-invoice xml file with a "DettaglioPagamento" section, the data import will fail and you will have the "Unsupported image format" message on top of the invoice. The use of '_compose_info_message' function is not possible on a 'account.edi.format' object and was changed to use the 'invoice' parameter. opw-2500569 closes odoo/odoo#72018 X-original-commit: 8e886704a4efb9ca2f8d2e2b021f66d668af40d8 Signed-off-by: Nicolas Lempereur (nle) --- addons/l10n_it_edi/models/account_edi_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_it_edi/models/account_edi_format.py b/addons/l10n_it_edi/models/account_edi_format.py index 3dfcbc11032..55e21fc8bd3 100644 --- a/addons/l10n_it_edi/models/account_edi_format.py +++ b/addons/l10n_it_edi/models/account_edi_format.py @@ -393,7 +393,7 @@ class AccountEdiFormat(models.Model): if elements: message_to_log.append("%s
%s" % ( _("Bank account not found, useful informations from XML file:"), - self._compose_info_message(body_tree, './/DatiPagamento'))) + invoice._compose_info_message(body_tree, './/DatiPagamento'))) # Invoice lines. <2.2.1> elements = body_tree.xpath('.//DettaglioLinee')