[FIX] auth_oauth: redirect to url before sign in
bzr revid: dle@openerp.com-20140407150027-z46yxuh3a9uqoz26
This commit is contained in:
parent
ffae380725
commit
6027657e3e
|
@ -68,7 +68,8 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home):
|
||||||
def get_state(self, provider):
|
def get_state(self, provider):
|
||||||
return dict(
|
return dict(
|
||||||
d=request.session.db,
|
d=request.session.db,
|
||||||
p=provider['id']
|
p=provider['id'],
|
||||||
|
r=request.httprequest.full_path
|
||||||
)
|
)
|
||||||
|
|
||||||
@http.route()
|
@http.route()
|
||||||
|
@ -114,8 +115,11 @@ class OAuthController(http.Controller):
|
||||||
cr.commit()
|
cr.commit()
|
||||||
action = state.get('a')
|
action = state.get('a')
|
||||||
menu = state.get('m')
|
menu = state.get('m')
|
||||||
|
redirect = state.get('r')
|
||||||
url = '/web'
|
url = '/web'
|
||||||
if action:
|
if redirect:
|
||||||
|
url = redirect
|
||||||
|
elif action:
|
||||||
url = '/web#action=%s' % action
|
url = '/web#action=%s' % action
|
||||||
elif menu:
|
elif menu:
|
||||||
url = '/web#menu_id=%s' % menu
|
url = '/web#menu_id=%s' % menu
|
||||||
|
|
Loading…
Reference in New Issue