[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 <arj@odoo.com> Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com> Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user