[FIX] res_users: fixed on_change_login that crashed
when changing the login by a void value. bzr revid: tde@openerp.com-20140304111452-np9537a3ja7vf1zi
This commit is contained in:
parent
257df67d32
commit
d6aeff2989
|
@ -167,8 +167,9 @@ class res_users(osv.osv):
|
|||
}
|
||||
|
||||
def on_change_login(self, cr, uid, ids, login, context=None):
|
||||
v = {'email': login} if tools.single_email_re.match(login) else {}
|
||||
return {'value': v}
|
||||
if login and tools.single_email_re.match(login):
|
||||
return {'value': {'email': login}}
|
||||
return {}
|
||||
|
||||
def on_change_company_id(self, cr, uid, ids, company_id):
|
||||
return {'warning' : {
|
||||
|
|
Loading…
Reference in New Issue