From a4f6533f3acfdbbafe38c14c31b9b8f26e0d3f2e Mon Sep 17 00:00:00 2001 From: "dle@openerp.com" <> Date: Tue, 19 Mar 2013 16:41:39 +0100 Subject: [PATCH] [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 --- addons/auth_oauth/controllers/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index 1c38f7f4eae..3f7ef2f3f0c 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -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