summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/controllers
diff options
context:
space:
mode:
authorDenis Ledoux <dle@openerp.com>2014-04-07 17:00:27 +0200
committerDenis Ledoux <dle@openerp.com>2014-04-07 17:00:27 +0200
commit6027657e3e20ade8a939da00bc2b3d5d2316c7b3 (patch)
treec31d419c04c052f2eecc0c2483cc63bd7f934719 /addons/auth_oauth/controllers
parentffae3807255269ff290bdf9fe62bc668feaade75 (diff)
[FIX] auth_oauth: redirect to url before sign in
bzr revid: dle@openerp.com-20140407150027-z46yxuh3a9uqoz26
Diffstat (limited to 'addons/auth_oauth/controllers')
-rw-r--r--addons/auth_oauth/controllers/main.py8
1 files 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