From 9323cee2f2e33ff7b45f9d6492b6255f07f23edd Mon Sep 17 00:00:00 2001 From: std-odoo Date: Wed, 9 Mar 2022 08:02:09 +0000 Subject: [PATCH] [IMP] mail_plugin: improve error message when the email is not valid Purpose ======= Improve the error message when the email of the contact / company is not valid. Task-2601837 closes odoo/odoo#86080 Signed-off-by: Thibault Delavallee (tde) --- addons/mail_plugin/controllers/mail_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail_plugin/controllers/mail_plugin.py b/addons/mail_plugin/controllers/mail_plugin.py index ea8eddc6685..666105ec958 100644 --- a/addons/mail_plugin/controllers/mail_plugin.py +++ b/addons/mail_plugin/controllers/mail_plugin.py @@ -43,7 +43,7 @@ class MailPluginController(http.Controller): normalized_email = partner.email_normalized if not normalized_email: - return {'error': _('Contact has no valid email')} + return {'error': _('The email of this contact is not valid and we can not enrich it')} company, enrichment_info = self._create_company_from_iap(normalized_email) @@ -70,7 +70,7 @@ class MailPluginController(http.Controller): normalized_email = partner.email_normalized if not normalized_email: - return {'error': 'Contact has no valid email'} + return {'error': 'The email of this contact is not valid and we can not enrich it'} domain = tools.email_domain_extract(normalized_email) iap_data = self._iap_enrich(domain)