Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
9125 Представления

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
4177
6
авг. 20
9148
0
апр. 15
7933
3
июл. 25
4253
0
мая 25
858