Hello everybody,
I want to show in the field user_id from the hr_employee form only users who are not related to an employee.
How can I do it?
Best regards
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello everybody,
I want to show in the field user_id from the hr_employee form only users who are not related to an employee.
How can I do it?
Best regards
Try changing the field definition in XML from
<field name="user_id" string="Related User"/>
to
<field name="user_id" string="Related User" domain="[('employee_ids', '=', False)]"/>
This will add a filter to the field restricting the selectable users to those that are not yet linked to an employee.