Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2303 Tampilan

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

i have an error

Avatar
Buang

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

Penulis
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


Jawaban Terbai

Hi Abdifitah Dahir AK  ,


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




thanks



Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Agu 24
7613
1
Sep 22
2676
1
Jul 22
6057
1
Jun 22
7195
7
Jun 20
6676