working on a repair module and have mechanic as field
mechanic_id = fields.Many2one('hr.employee', string="Mechanic's In Charge")
In my view, i want to limit the employees in the dropdown to be employees only in "garage" department and job type "mechanic".
This is my code
<field name="mechanic_id" required="1"
domain="('job_id.name', '=', 'Mechanic'),
('department_id.name', '=', 'Garage')" />
But it tells me name is not an attribute.
Sorry if i have funny code, but what am i doing wrong?
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: 2/3/16, 4:56 AM|
|Seen: 326 times|
|Last updated: 2/3/16, 5:58 AM|