Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2361 มุมมอง

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



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 24
7666
1
ก.ย. 22
2739
1
ก.ค. 22
6107
1
มิ.ย. 22
7276
7
มิ.ย. 20
6746