コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
9082 ビュー

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
4月 24
4150
6
8月 20
9109
0
4月 15
7908
3
7月 25
4167
0
5月 25
842