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

filter by the value of a many2one field

By
aymen mino
on 6/12/14, 6:01 AM 531 views

if I wanted to filter by the value of a many2one field, I'll do it this way:

domain = [('field', '=', 'res.users.field')]   ...

Thanks in advance
 

0

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4341
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 6/12/14, 11:32 AM

Aymen,

What is the datatype of the 'field' and is it name or id? (of the many2one field)

Thanks.

0
aymen mino
On 6/13/14, 6:18 AM

Thank you for responding ,

it's name,"char" ,i added i field into res.users called x_etab , it's a many2one from projet.etablissement table , and i want to filter by this field (x_etab) , so in the domain value i did like this   [('etablissement', '=', 'res.users.x_etab')] .

I want to display a list of students for each users who have the same establishment(the same x_etab) 

i need help thank you 

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: 6/12/14, 6:01 AM
Seen: 531 times
Last updated: 3/16/15, 8:10 AM