summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-07-16 14:38:14 +0000
committerAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-07-17 09:15:02 +0000
commit36138916f54711601fbd50da9a6a486e049d8f72 (patch)
treed0dc489e6744f461bfb63d0c2081b6fefc877763
parent49fc197925f44b0ffd09ca7a821f5e7ac5476b68 (diff)
[FIX] l10n_it_edi: fix traceback on fetchmail
When the server execute the job 'Mail: Fetchmail Service' if it's processed an attachment having a Notes field with None values the following traceback will occur AttributeError: 'NoneType' object has no attribute 'split' //IdentificativoSdI','//DataOraRicezione','//Descrizione','//MessageId','//Note'. seems to be not mandatory opw-2277722 closes odoo/odoo#54636 X-original-commit: f96be5eb77a998037bdf0b88f96160b856dfc67a Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
-rw-r--r--addons/l10n_it_edi/models/ir_mail_server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/l10n_it_edi/models/ir_mail_server.py b/addons/l10n_it_edi/models/ir_mail_server.py
index 8830af16b93..40ff2e1a036 100644
--- a/addons/l10n_it_edi/models/ir_mail_server.py
+++ b/addons/l10n_it_edi/models/ir_mail_server.py
@@ -339,8 +339,8 @@ class FetchmailServer(models.Model):
if not elements:
continue
for element in elements:
- text = " ".join(element.text.split())
- if text:
+ if element.text:
+ text = " ".join(element.text.split())
output_str += "<li>%s: %s</li>" % (element.tag, text)
return output_str + "</ul>"