[FIX]auth_signup: string concatenation now allowing action_id(integer) + able to redict to menu_id if no action given

bzr revid: dle@openerp.com-20130319154139-283864fcfixvmw0g
This commit is contained in:
dle@openerp.com
2013-03-19 16:41:39 +01:00
parent 4ab080bc03
commit a4f6533f3a
+7 -2
View File
@@ -64,8 +64,13 @@ class OAuthController(oeweb.Controller):
u = registry.get('res.users')
credentials = u.auth_oauth(cr, SUPERUSER_ID, provider, kw, context=context)
cr.commit()
action = state.get('a', None)
url = '/#action=' + action if action else '/'
action = state.get('a')
menu = state.get('m')
url = '/'
if action:
url = '/#action=%s' % action
elif menu:
url = '/#menu_id=%s' % menu
return login_and_redirect(req, *credentials, redirect_url=url)
except AttributeError:
# auth_signup is not installed