Commit Graph
2 Commits
Author SHA1 Message Date
Paolo Gatti (pgi) 3cdb215684 [FIX] l10n_it_edi: several fixes and improvements
- l10n_it_edi: EDI receiving cron error handling fix
If we cannot receive invoices or bills from the IAP proxy we also can't
iterate over them

- l10n_it_edi: Check edi_format before trying to remove signature
The edi_format must be checked before trying to remove the eventual
PKCS#7 signature from the file, otherwise we're uselessly going to try
and remove the signature for every edi_format check (facturX etc.)

- l10n_it_edi: .p7m files can wrongly be missing the signature
In the case that the .p7m extension is put by mistake, try to use the
content of the file as it is before discarding it.

Task link: https://www.odoo.com/web#id=3189457&model=project.task
Task-3189457

closes odoo/odoo#113451

X-original-commit: 942e3c7f2b549fed86f9eb76f98f30b7e5db1ae9
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2023-02-23 10:31:01 +01:00
Paolo (pgi) a4734877a4 [FIX] l10n_it_edi: Vendor bill is not being created from PEC
When one or more vendor bills in Italian e-invoice format were sent to the registered PEC mailbox, if they are in the PKCS#7 format ('.xml.p7m'), nothing happened.
The e-invoice content should be automatically decoded and the invoice should be created as soon as the xml file is fetched from the PEC mailbox.

A new remove_signature function has been added in a tools/remove_signature.py file to handle this case.
The OpenSSL and pyOpenSSL libraries must be installed.
They are not in requirements.txt but they're probably available.

New tests has been provided for the signed email reading method.

opw-2460485

closes odoo/odoo#71164

X-original-commit: ed723be917637320fc4d2787bdf505e4a7a8216d
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Paolo Gatti <lordkrandel@users.noreply.github.com>
2021-05-21 15:10:48 +00:00