-1

I cant access employee table ie hr_employee table fields from my new module.

It shows error as

AttributeError: 'Field parent_id not found in browse_record(hr.employee, 6)

Any one please help!!!

Anu

Saghir A. Khatri
  • 3,429
  • 6
  • 45
  • 76
anu
  • 1
  • 2
  • Please provide your code. Without that we can't help you. – Bhavesh Odedra Sep 11 '14 at 09:03
  • if i login as admin i can access the table, but not for other users. Do you have any idea , what the issue is?my code is given below ids = args['creditnote_no'] values = {'status':'approved'} employee = self.pool.get('hr.employee').browse(cr, uid, uid, context=context) args['manager_id'] = employee.parent_id.user_id.id – anu Sep 11 '14 at 14:17

1 Answers1

-1

changing code to:

resource_id = self.pool.get('resource.resource').search(cr, uid, [('user_id','=', uid)][0] Emp_id = self.pool.get('hr.employee').search(cr, uid, [('resource_id','=', resource_id)][0]

corrected my issue.

Saghir A. Khatri
  • 3,429
  • 6
  • 45
  • 76
anu
  • 1
  • 2