[FIX] auth_signup: do not send email to duplicated user
When duplicating a user, an email was sent to a user at the email of the previous user (as the create is called before changing the email). opw-1853359
This commit is contained in:
committed by
Nicolas Martinelli
parent
f9737d79e7
commit
2e4a75cbee
@@ -155,5 +155,5 @@ class ResUsers(models.Model):
|
||||
sup = super(ResUsers, self)
|
||||
if not default or not default.get('email'):
|
||||
# avoid sending email to the user we are duplicating
|
||||
sup = super(ResUsers, self.with_context(reset_password=False))
|
||||
sup = super(ResUsers, self.with_context(no_reset_password=True))
|
||||
return sup.copy(default=default)
|
||||
|
||||
Reference in New Issue
Block a user