[FIX] mail: cannot duplicate users when mail is installed (allmost all the time, thus)

bzr revid: dle@openerp.com-20140127110411-ff0vrva5j2vdt1sc
This commit is contained in:
Denis Ledoux 2014-01-27 12:04:11 +01:00
parent e10270d153
commit a629cd41a2
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class res_users(osv.Model):
def copy_data(self, *args, **kwargs):
data = super(res_users, self).copy_data(*args, **kwargs)
if data.get('alias_name'):
if data and data.get('alias_name'):
data['alias_name'] = data['login']
return data