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

i need to filter my view using domain the filter must use parameters for the connected user

my code : [('exercice_id','=', uid.exercice_id.id)]
on user class i have field named exercice_id

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

For version 14, it is:

domain="[('user_id', '=', uid)]" 

You can search the View XML for your version, find the V14 XML definition of the CRM "My Leads" filter at https://github.com/odoo/odoo/blob/14.0/addons/crm/views/crm_lead_views.xml#L577

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

You can get the current user in xml by using user.id so try to use user.exercice_id.id

อวตาร
ละทิ้ง
ผู้เขียน

Thanks CorText IT Solutuon for your response,
i got this error

Error: NameError: name 'user' is not defined

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
เม.ย. 24
4154
6
ส.ค. 20
9119
0
เม.ย. 15
7911
naked domain set up แก้ไขแล้ว
3
ก.ค. 25
4183
0
พ.ค. 25
846