Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2532 Visualizzazioni

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

i have an error

Avatar
Abbandona

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

Autore
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


Risposta migliore

Hi Abdifitah Dahir AK  ,


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




thanks



Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
ago 24
7912
1
set 22
2960
1
lug 22
6307
1
giu 22
7539
7
giu 20
6981