diff --git a/addons/google_gmail/i18n/google_gmail.pot b/addons/google_gmail/i18n/google_gmail.pot index 91eed151227c33bfea2b3a74d34534cab741c634..c2d363dce495366fb29bd1e5abe28ddb601a28c3 100644 --- a/addons/google_gmail/i18n/google_gmail.pot +++ b/addons/google_gmail/i18n/google_gmail.pot @@ -146,6 +146,15 @@ msgstr "" msgid "Please configure your Gmail credentials." msgstr "" +#. module: google_gmail +#: code:addons/google_gmail/models/google_gmail_mixin.py:0 +#, python-format +msgid "" +"Please fill the \"Username\" field with your Gmail username (your email " +"address). This should be the same account as the one used for the Gmail " +"OAuthentication Token." +msgstr "" + #. module: google_gmail #: model:ir.model.fields,field_description:google_gmail.field_google_gmail_mixin__google_gmail_refresh_token #: model:ir.model.fields,field_description:google_gmail.field_ir_mail_server__google_gmail_refresh_token diff --git a/addons/google_gmail/models/google_gmail_mixin.py b/addons/google_gmail/models/google_gmail_mixin.py index 289a0443fb81f89743193d4346c416d80e6ad553..7254c915f1d14f5cb198a14559affae959de716e 100644 --- a/addons/google_gmail/models/google_gmail_mixin.py +++ b/addons/google_gmail/models/google_gmail_mixin.py @@ -72,6 +72,11 @@ class GoogleGmailMixin(models.AbstractModel): if not self.google_gmail_uri: raise UserError(_('Please configure your Gmail credentials.')) + if not self.smtp_user: + raise UserError(_( + 'Please fill the "Username" field with your Gmail username (your email address). ' + 'This should be the same account as the one used for the Gmail OAuthentication Token.')) + return { 'type': 'ir.actions.act_url', 'url': self.google_gmail_uri, diff --git a/addons/microsoft_outlook/i18n/microsoft_outlook.pot b/addons/microsoft_outlook/i18n/microsoft_outlook.pot index 53723838672aa3e46be560eecc3bb7ba4181e090..021331bccfd7030fc43a02fc3e9cfe923440a863 100644 --- a/addons/microsoft_outlook/i18n/microsoft_outlook.pot +++ b/addons/microsoft_outlook/i18n/microsoft_outlook.pot @@ -149,6 +149,15 @@ msgstr "" msgid "Please configure your Outlook credentials." msgstr "" +#. module: microsoft_outlook +#: code:addons/microsoft_outlook/models/microsoft_outlook_mixin.py:0 +#, python-format +msgid "" +"Please fill the \"Username\" field with your Outlook/Office365 username " +"(your email address). This should be the same account as the one used for " +"the Outlook OAuthentication Token." +msgstr "" + #. module: microsoft_outlook #: code:addons/microsoft_outlook/models/ir_mail_server.py:0 #, python-format diff --git a/addons/microsoft_outlook/models/microsoft_outlook_mixin.py b/addons/microsoft_outlook/models/microsoft_outlook_mixin.py index 2bd78018be0cfe34b2db50b1f11dada8d74785f7..abd331ff208f839e92205a57a6be391c81102478 100644 --- a/addons/microsoft_outlook/models/microsoft_outlook_mixin.py +++ b/addons/microsoft_outlook/models/microsoft_outlook_mixin.py @@ -81,6 +81,11 @@ class MicrosoftOutlookMixin(models.AbstractModel): if not self.use_microsoft_outlook_service or not self.is_microsoft_outlook_configured: raise UserError(_('Please configure your Outlook credentials.')) + if not self.smtp_user: + raise UserError(_( + 'Please fill the "Username" field with your Outlook/Office365 username (your email address). ' + 'This should be the same account as the one used for the Outlook OAuthentication Token.')) + return { 'type': 'ir.actions.act_url', 'url': self.microsoft_outlook_uri,