From f8ce09276a840308c70dae04834818d049a1f2e5 Mon Sep 17 00:00:00 2001 From: pedrambiria Date: Tue, 28 Feb 2023 15:56:06 +0000 Subject: [PATCH] [FIX] google_calendar: send the request URL for the `redirect_uri` Before this commit: if a different `web.base.url` is set with `web.base.url.freeze`, during the first synchronization of Google calendar it will show a mismatch URL error. The problem is that we send the `redirect_uri` based on the `web.base.url` in the `_get_authorize_uri` function. The solution is to use the request root URL instead. opw-3175539 closes odoo/odoo#114482 X-original-commit: 8f94f2ec864bdb54e3deb9b853a2720c5c92f592 Signed-off-by: Arnaud Joset Signed-off-by: Pedram Bi Ria (pebr) Signed-off-by: Thibault Delavallee (tde) --- addons/google_account/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/google_account/controllers/main.py b/addons/google_account/controllers/main.py index 1078808f073..37d2234d056 100644 --- a/addons/google_account/controllers/main.py +++ b/addons/google_account/controllers/main.py @@ -17,7 +17,7 @@ class GoogleAuth(http.Controller): url_return = state.get('f') if kw.get('code'): - base_url = request.env.user.get_base_url() + base_url = request.httprequest.url_root.strip('/') or request.env.user.get_base_url() access_token, refresh_token, ttl = request.env['google.service']._get_google_tokens( kw['code'], service,