From dd87eb77f361aef78a3588cb5609705a1e105591 Mon Sep 17 00:00:00 2001 From: std-odoo Date: Fri, 13 May 2022 05:41:34 +0000 Subject: [PATCH] [FIX] google_gmail, fetchmail_gmail: use Odoo endpoint for authentication Purpose ======= The flow where we copy / paste the authorization code will be depreciated. Because of that, we know use the newest authentication system which use redirect URI. Technical ========= Now, the user is redirected to an Odoo endpoint "google_gmail/confirm" and the access token / refresh token are automatically fetched. Documentation https://developers.google.com/identity/protocols/oauth2/native-app Task-2852560 closes odoo/odoo#94476 X-original-commit: 69bd9bc6b36fdd55e8e859667bcddddad6db7d06 Signed-off-by: Thibault Delavallee (tde) --- .../fetchmail_gmail/i18n/fetchmail_gmail.pot | 32 +++- .../views/fetchmail_server_views.xml | 36 +++-- addons/google_gmail/__init__.py | 1 + addons/google_gmail/controllers/__init__.py | 4 + addons/google_gmail/controllers/main.py | 76 +++++++++ addons/google_gmail/i18n/google_gmail.pot | 57 ++++++- .../google_gmail/models/google_gmail_mixin.py | 151 ++++++++++++++---- .../views/ir_mail_server_views.xml | 35 ++-- 8 files changed, 326 insertions(+), 66 deletions(-) create mode 100644 addons/google_gmail/controllers/__init__.py create mode 100644 addons/google_gmail/controllers/main.py diff --git a/addons/fetchmail_gmail/i18n/fetchmail_gmail.pot b/addons/fetchmail_gmail/i18n/fetchmail_gmail.pot index 55c778ec99a..e4f1f7af6a3 100644 --- a/addons/fetchmail_gmail/i18n/fetchmail_gmail.pot +++ b/addons/fetchmail_gmail/i18n/fetchmail_gmail.pot @@ -15,6 +15,28 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: fetchmail_gmail +#: model_terms:ir.ui.view,arch_db:fetchmail_gmail.fetchmail_server_view_form +msgid "" +"\n" +" Connect your Gmail account" +msgstr "" + +#. module: fetchmail_gmail +#: model_terms:ir.ui.view,arch_db:fetchmail_gmail.fetchmail_server_view_form +msgid "" +"\n" +" Edit Settings" +msgstr "" + +#. module: fetchmail_gmail +#: model_terms:ir.ui.view,arch_db:fetchmail_gmail.fetchmail_server_view_form +msgid "" +" - -