Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2755 มุมมอง

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
 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Aymen,

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

Thanks.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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 

อวตาร
ละทิ้ง