Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to filter to show all coach_id with job_id value like "Manager" using domain filter

By
philip
on 11/30/14, 10:24 AM 628 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

0

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 11/30/14, 10:26 PM

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.

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

philip
on 11/30/14, 10:52 PM

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.

Ivan
on 11/30/14, 11:27 PM

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/30/14, 10:24 AM
Seen: 628 times
Last updated: 3/16/15, 8:10 AM