[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:
Nicolas Martinelli
2018-06-25 08:37:24 +02:00
committed by Nicolas Martinelli
parent f9737d79e7
commit 2e4a75cbee
+1 -1
View File
@@ -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)