From 6027657e3e20ade8a939da00bc2b3d5d2316c7b3 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 7 Apr 2014 17:00:27 +0200 Subject: [PATCH] [FIX] auth_oauth: redirect to url before sign in bzr revid: dle@openerp.com-20140407150027-z46yxuh3a9uqoz26 --- addons/auth_oauth/controllers/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index 6d28813507c..fddf439aa1d 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -68,7 +68,8 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home): def get_state(self, provider): return dict( d=request.session.db, - p=provider['id'] + p=provider['id'], + r=request.httprequest.full_path ) @http.route() @@ -114,8 +115,11 @@ class OAuthController(http.Controller): cr.commit() action = state.get('a') menu = state.get('m') + redirect = state.get('r') url = '/web' - if action: + if redirect: + url = redirect + elif action: url = '/web#action=%s' % action elif menu: url = '/web#menu_id=%s' % menu