Skip to content
Snippets Groups Projects
Unverified Commit 50b89347 authored by xmo-odoo's avatar xmo-odoo Committed by GitHub
Browse files

[FIX] auth_signup: fix b2c signup

Rather than requiring the user have a name *or* a partner, the check
required the user have a name *and* a partner. The B2C form only has a
name and expects the partner to be created from/via the user, so this
would raise an exception which wouldn't even be bubbled to the user, so
trying to signup would just yield a 500 Server Error when trying to
create an account.
parent 37eed7c5
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ class ResUsers(models.Model):
if not values.get('login'):
raise ValueError(_('Signup: no login given for new user'))
if not values.get('partner_id') or not values.get('name'):
if not values.get('partner_id') and not values.get('name'):
raise ValueError(_('Signup: no name or partner given for new user'))
# create a copy of the template user (attached to a specific partner_id if given)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment