[FIX] auth_signup: don't crash on user copy

Altering a frozen dict is not allowed

Backport from 7c513773e9
This commit is contained in:
Virbhadrasinh Gohil
2016-04-11 12:24:59 +02:00
committed by Richard Mathot
parent 50143ff729
commit 282538cbfe
+3 -3
View File
@@ -149,8 +149,8 @@ class ResUsers(models.Model):
@api.multi
def copy(self, default=None):
self.ensure_one()
context = self.env.context
sup = super(ResUsers, self)
if not default or not default.get('email'):
# avoid sending email to the user we are duplicating
context['reset_password'] = False
return super(ResUsers, self.with_context(context)).copy(default=default)
sup = super(ResUsers, self.with_context(reset_password=False))
return sup.copy(default=default)