-
niyasraphy authored
The orginal PR and it's forward ports https://github.com/odoo/odoo/pull/121048 intorduced an unexpected AttributeError when using OAuth for incoming mail servers (fetchmail.server). Since `smtp_user` is not a defined field in fetchmail.server (it uses the field `user` instead), we had to change the approach. To prevent this error, we move the UserError call into the respective ir_mail_server models, which should check the contrains at that level. This means that before the form gets saved, trying to connect using an OAuth account, should prompt the user to first specify an smtp_user before proceeding. closes odoo/odoo#122222 Signed-off-by:
Stéphane Debauche (std) <std@odoo.com>
niyasraphy authoredThe orginal PR and it's forward ports https://github.com/odoo/odoo/pull/121048 intorduced an unexpected AttributeError when using OAuth for incoming mail servers (fetchmail.server). Since `smtp_user` is not a defined field in fetchmail.server (it uses the field `user` instead), we had to change the approach. To prevent this error, we move the UserError call into the respective ir_mail_server models, which should check the contrains at that level. This means that before the form gets saved, trying to connect using an OAuth account, should prompt the user to first specify an smtp_user before proceeding. closes odoo/odoo#122222 Signed-off-by:
Stéphane Debauche (std) <std@odoo.com>
google_gmail.pot 6.04 KiB
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * google_gmail
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-25 14:36+0000\n"
"PO-Revision-Date: 2022-01-25 14:36+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: google_gmail
#: model_terms:ir.ui.view,arch_db:google_gmail.ir_mail_server_view_form
msgid ""
"<i class=\"fa fa-arrow-right\"/>\n"
" Connect your Gmail account"
msgstr ""
#. module: google_gmail
#: model_terms:ir.ui.view,arch_db:google_gmail.ir_mail_server_view_form
msgid ""
"<i class=\"fa fa-cog\"/>\n"
" Edit Settings"
msgstr ""
#. module: google_gmail
#: model_terms:ir.ui.view,arch_db:google_gmail.ir_mail_server_view_form
msgid ""
"<span attrs=\"{'invisible': ['|', ('use_google_gmail_service', '=', False), ('google_gmail_refresh_token', '=', False)]}\" class=\"badge badge-success\">\n"
" Gmail Token Valid\n"
" </span>"
msgstr ""
#. module: google_gmail
#: model_terms:ir.ui.view,arch_db:google_gmail.res_config_settings_view_form
msgid "<span class=\"o_form_label\">Gmail Credentials</span>"
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_google_gmail_mixin__google_gmail_access_token
#: model:ir.model.fields,field_description:google_gmail.field_ir_mail_server__google_gmail_access_token
msgid "Access Token"
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_google_gmail_mixin__google_gmail_access_token_expiration
#: model:ir.model.fields,field_description:google_gmail.field_ir_mail_server__google_gmail_access_token_expiration
msgid "Access Token Expiration Timestamp"
msgstr ""
#. module: google_gmail
#: code:addons/google_gmail/controllers/main.py:0
#: code:addons/google_gmail/controllers/main.py:0
#, python-format
msgid "An error occur during the authentication process."
msgstr ""
#. module: google_gmail
#: code:addons/google_gmail/models/google_gmail_mixin.py:0
#, python-format
msgid "An error occurred when fetching the access token."
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_google_gmail_mixin__google_gmail_authorization_code
#: model:ir.model.fields,field_description:google_gmail.field_ir_mail_server__google_gmail_authorization_code
msgid "Authorization Code"
msgstr ""
#. module: google_gmail
#: model_terms:ir.ui.view,arch_db:google_gmail.res_config_settings_view_form
msgid "Client ID"
msgstr ""
#. module: google_gmail
#: model_terms:ir.ui.view,arch_db:google_gmail.res_config_settings_view_form
msgid "Client Secret"
msgstr ""
#. module: google_gmail
#: model:ir.model,name:google_gmail.model_res_config_settings
msgid "Config Settings"
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_google_gmail_mixin__display_name
msgid "Display Name"
msgstr ""
#. module: google_gmail
#: model_terms:ir.ui.view,arch_db:google_gmail.ir_mail_server_view_form
msgid "Gmail"
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_google_gmail_mixin__use_google_gmail_service
#: model:ir.model.fields,field_description:google_gmail.field_ir_mail_server__use_google_gmail_service
msgid "Gmail Authentication"
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_res_config_settings__google_gmail_client_identifier
msgid "Gmail Client Id"
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_res_config_settings__google_gmail_client_secret
msgid "Gmail Client Secret"
msgstr ""
#. module: google_gmail
#: model:ir.model,name:google_gmail.model_google_gmail_mixin
msgid "Google Gmail Mixin"
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_google_gmail_mixin__id
msgid "ID"
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_google_gmail_mixin____last_update
msgid "Last Modified on"
msgstr ""
#. module: google_gmail
#: model:ir.model,name:google_gmail.model_ir_mail_server
msgid "Mail Server"
msgstr ""
#. module: google_gmail
#: code:addons/google_gmail/models/google_gmail_mixin.py:0
#, python-format
msgid "Only the administrator can link a Gmail mail server."
msgstr ""
#. module: google_gmail
#: code:addons/google_gmail/models/google_gmail_mixin.py:0
#, python-format
msgid "Please configure your Gmail credentials."
msgstr ""
#. module: google_gmail
#: code:addons/google_gmail/models/ir_mail_server.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
msgid "Refresh Token"
msgstr ""
#. module: google_gmail
#: model_terms:ir.ui.view,arch_db:google_gmail.res_config_settings_view_form
msgid "Send and receive email with your Gmail account."
msgstr ""
#. module: google_gmail
#: model_terms:ir.ui.view,arch_db:google_gmail.ir_mail_server_view_form
msgid ""
"Setup your Gmail API credentials in the general settings to link a Gmail "
"account."
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,help:google_gmail.field_google_gmail_mixin__google_gmail_uri
#: model:ir.model.fields,help:google_gmail.field_ir_mail_server__google_gmail_uri
msgid "The URL to generate the authorization code from Google"
msgstr ""
#. module: google_gmail
#: model:ir.model.fields,field_description:google_gmail.field_google_gmail_mixin__google_gmail_uri
#: model:ir.model.fields,field_description:google_gmail.field_ir_mail_server__google_gmail_uri
msgid "URI"
msgstr ""