تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
9098 أدوات العرض

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أبريل 24
4155
6
أغسطس 20
9120
0
أبريل 15
7912
naked domain set up تم الحل
3
يوليو 25
4184
0
مايو 25
847