[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) <nle@odoo.com>
This commit is contained in:
Thomas Beckers
2021-06-10 18:50:27 +00:00
parent 1c2598b84c
commit 3b338cc687
@@ -393,7 +393,7 @@ class AccountEdiFormat(models.Model):
if elements:
message_to_log.append("%s<br/>%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')