[FIX] res_users: do not copy login_date when duplicating users
This commit is contained in:
parent
5f6d324db6
commit
074c7b6c25
|
@ -368,6 +368,12 @@ class res_users(osv.osv):
|
||||||
default['login'] = _("%s (copy)") % user2copy['login']
|
default['login'] = _("%s (copy)") % user2copy['login']
|
||||||
return super(res_users, self).copy(cr, uid, id, default, context)
|
return super(res_users, self).copy(cr, uid, id, default, context)
|
||||||
|
|
||||||
|
def copy_data(self, cr, uid, ids, default=None, context=None):
|
||||||
|
if default is None:
|
||||||
|
default = {}
|
||||||
|
default.update({'login_date': False})
|
||||||
|
return super(res_users, self).copy_data(cr, uid, ids, default, context=context)
|
||||||
|
|
||||||
@tools.ormcache(skiparg=2)
|
@tools.ormcache(skiparg=2)
|
||||||
def context_get(self, cr, uid, context=None):
|
def context_get(self, cr, uid, context=None):
|
||||||
user = self.browse(cr, SUPERUSER_ID, uid, context)
|
user = self.browse(cr, SUPERUSER_ID, uid, context)
|
||||||
|
|
Loading…
Reference in New Issue