Skip to Content
Menu
This question has been flagged
2 Replies
9118 Zobrazenia

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

Avatar
Zrušiť
Best Answer

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

Avatar
Zrušiť
Best Answer

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

Avatar
Zrušiť
Autor

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

Error: NameError: name 'user' is not defined

Related Posts Replies Zobrazenia Aktivita
2
apr 24
4167
6
aug 20
9136
0
apr 15
7929
3
júl 25
4236
0
máj 25
852