How do I access the department_id through the user.id on a domain filter?
I created a rule with Leave as the object. My goal is to have the user see leaves only from employees of his/her department. I see that an employee is connected to the user by user.id and employee contains the field department_id.
None of the following domain filters worked:
I would say this is the right answer:
<field name="domain_force">[('department_id.member_ids.user_id', 'in', [user.id])]</field>
- user.id" - in the data model of OpenERP for res_users no way to hr_employee is possible
- therefore department_id.member_ids will just give back a list with employee_ids
- in hr.employee the field user_id is available - therefore the path deparment_id.member_ids.user_id is the right way
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 6/26/13, 7:10 AM|
|Seen: 7440 times|
|Last updated: 3/16/15, 8:10 AM|