summaryrefslogtreecommitdiff
path: root/addons/auth_signup/controllers
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-01-07 18:21:13 +0100
committerChristophe Simonis <chs@odoo.com>2016-01-07 18:21:13 +0100
commit4852d6033d8d11aa62434a0df22aa24d5760fdb0 (patch)
tree327deda5210017a1514ddc87a64663cca74f63c6 /addons/auth_signup/controllers
parent5ba5172d9922c76b07f2e510dc676760aba89827 (diff)
parent99b6cd8119211414602c739087c57d1966198f8e (diff)
[MERGE] forward port of branch saas-8 up to 99b6cd8
Diffstat (limited to 'addons/auth_signup/controllers')
-rw-r--r--addons/auth_signup/controllers/main.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py
index 9ebd4e657b5..779f6e34301 100644
--- a/addons/auth_signup/controllers/main.py
+++ b/addons/auth_signup/controllers/main.py
@@ -34,7 +34,11 @@ class AuthSignupHome(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)