[FIX] context_get on user object if the value is none
bzr revid: mra@tinyerp.com-20100211052924-ykzul05nd9h1mmo1
This commit is contained in:
parent
d4036f0841
commit
0a5f82bd3b
|
@ -296,13 +296,12 @@ class users(osv.osv):
|
|||
result = {}
|
||||
for k in self._columns.keys():
|
||||
if k.startswith('context_'):
|
||||
res = getattr(user,k)
|
||||
res = getattr(user,k) or False
|
||||
if isinstance(res, browse_record):
|
||||
res = res.id
|
||||
result[k[8:]] = res
|
||||
return result
|
||||
|
||||
|
||||
def action_get(self, cr, uid, context={}):
|
||||
dataobj = self.pool.get('ir.model.data')
|
||||
data_id = dataobj._get_id(cr, 1, 'base', 'action_res_users_my')
|
||||
|
|
Loading…
Reference in New Issue