[IMP] base: Don't set customer=True on new users
Purpose ======= Create a user, then the partner is shown in Customers. Most of the time, user is not a customer.
This commit is contained in:
@@ -426,6 +426,7 @@ class Users(models.Model):
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
users = super(Users, self).create(vals_list)
|
||||
users.write({'customer': False})
|
||||
for user in users:
|
||||
user.partner_id.active = user.active
|
||||
if user.partner_id.company_id:
|
||||
|
||||
Reference in New Issue
Block a user