콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
9157 화면

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
4217
6
8월 20
9173
0
4월 15
7990
naked domain set up 해결 완료
3
7월 25
4318
0
5월 25
885