Hi all
i have code like this
class mtc_hr_analytic_timesheet(osv.osv):
_inherit = 'hr.analytic.timesheet'
_columns = {
'approver' : fields.many2one('res.users','Approver',readonly=True),
}
i want value in field approver store to my database. but when i use readonly its doesnt work. the value dissapear when i save.
i have use strore=True but its doesnt work.
anyone can help me how to solve this problem??
Thanks before
Can you give an example code of the contents of xyz_id ?
for example, to get the id of the ERP Manager
users_ids = self.pool.get('res.users').search(cr, uid, [])
for _id in users_ids:
if self.pool['res.users'].has_group(cr, _id, 'base.group_erp_manager')
xyz_id = _id