diff options
| author | Martin Trigaux <mat@odoo.com> | 2016-01-05 18:28:06 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2016-01-05 18:28:06 +0100 |
| commit | 8b4f052a3872b397bbe252e353b1d18d273ec8ff (patch) | |
| tree | d5f8dd6d6dbc5065affadbbfed44d02f28733195 /addons/auth_signup/controllers/main.py | |
| parent | c649bb0df61eb19de510992cc5f2200fef89cb82 (diff) | |
| parent | 0f085db19e496c31d12ca66bcf75c2ac239b8667 (diff) | |
[MERGE] Forwardport of branch saas-6 up to c649bb0df
Diffstat (limited to 'addons/auth_signup/controllers/main.py')
| -rw-r--r-- | addons/auth_signup/controllers/main.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py index 9035a650809..b508514617f 100644 --- a/addons/auth_signup/controllers/main.py +++ b/addons/auth_signup/controllers/main.py @@ -36,7 +36,11 @@ class AuthSignupHome(openerp.addons.web.controllers.main.Home): self.do_signup(qcontext) return super(AuthSignupHome, self).web_login(*args, **kw) except (SignupError, AssertionError), e: - qcontext['error'] = _(e.message) + if request.env["res.users"].sudo().search([("login", "=", qcontext.get("login"))]): + qcontext["error"] = _("Another user is already registered using this email address.") + else: + _logger.error(e.message) + qcontext['error'] = _("Could not create a new account.") return request.render('auth_signup.signup', qcontext) |
