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

i have this code 
how can i add odoo14 filter many2many read by user's department.

i have an error

아바타
취소

I can't see your code. Please share your code to help you.

작성자
domain_force in ir.rule you can read this code 
<field name="domain_force">['|', '|', ('department_id', '=', False), ('department_id', 'in', [dep.id for dep in user.department_ids])]field>

so I need to read my filter in search view

<filter name="my_departments" string="My Departments" domain="[('department_id', 'in',[dep.id for dep in uid.department_ids])]"/>
this code there is an error please help if you know how to read filter user's department_ids


베스트 답변

Hi Abdifitah Dahir AK  ,


if you have defined this field 'department_id' in your model, then try this filter:




thanks



아바타
취소
관련 게시물 답글 화면 활동
1
8월 24
8196
1
9월 22
3301
1
7월 22
6627
1
6월 22
7893
7
6월 20
7266