Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2489 Vizualizări

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

i have an error

Imagine profil
Abandonează

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

Autor
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


Cel mai bun răspuns

Hi Abdifitah Dahir AK  ,


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




thanks



Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
aug. 24
7826
1
sept. 22
2894
1
iul. 22
6266
1
iun. 22
7472
7
iun. 20
6918