From 2e4a75cbee162381c814ccc3e07d61c35dc88485 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 22 Jun 2018 11:11:21 +0200 Subject: [PATCH] [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 --- addons/auth_signup/models/res_users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/auth_signup/models/res_users.py b/addons/auth_signup/models/res_users.py index b58606b73ab..8530f36f325 100644 --- a/addons/auth_signup/models/res_users.py +++ b/addons/auth_signup/models/res_users.py @@ -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)