Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
9108 Переглядів

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
4158
6
серп. 20
9126
0
квіт. 15
7917
naked domain set up Вирішено
3
лип. 25
4191
0
трав. 25
848