From 19b878ca55bfa22a675f2349e322640eb13243d5 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Wed, 5 Dec 2012 17:10:22 +0100 Subject: [PATCH] [IMP] auth_oauth: allow to redirect to a given action bzr revid: chs@openerp.com-20121205161022-bsf2el39azao9iqk --- addons/auth_oauth/controllers/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index 4c7c5377184..f461a675a47 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -62,7 +62,9 @@ class OAuthController(oeweb.Controller): u = registry.get('res.users') credentials = u.auth_oauth(cr, SUPERUSER_ID, provider, kw, context=context) cr.commit() - return login_and_redirect(req, *credentials) + action = state.get('a', None) + url = '/#action=' + action if action else '/' + return login_and_redirect(req, *credentials, redirect_url=url) except AttributeError: # auth_signup is not installed _logger.error("auth_signup not installed on database %s: oauth sign up cancelled." % (dbname,))