Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2492 Widoki

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

i have an error

Awatar
Odrzuć

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


Najlepsza odpowiedź

Hi Abdifitah Dahir AK  ,


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




thanks



Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 24
7833
1
wrz 22
2897
1
lip 22
6267
1
cze 22
7477
7
cze 20
6926