This question has been flagged
1 Reply
2929 Views

Hi all,

in my coach_id selection I have the ff:

coach_id -------- job_id
juna        -------- manager
pedro      -------- employee
ana         -------- manager

how to filter to show coach_id with manager job_id in my new selection fields

Thanks

Avatar
Discard
Best Answer

If you are using selection field you can't.  Domain does not work for selection fields.

If you are using many2one field, you can put domain attribute when you define the field in the _column attribute.

Or if you are using many2one field and NOT use widget="selection" attribute, you can define the domain the the view.

Avatar
Discard
Author

What the best way to achieve this? Im using hr module, and I have two fields used, which is job_id many2one and coach_id many2one. in coach_id now showing list of employee you currently added but in my case I need to filter those employee with job_id like manager. In job_id I have job categories "manager, utility, supervisor". I don't know where can I add domain filter. Thanks

Since you have everything set-up already, it seemed, then the best way to test it is to add domain attribute at the coach_id field in the view in question.