Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2481 Weergaven

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

i have an error

Avatar
Annuleer

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

Auteur
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


Beste antwoord

Hi Abdifitah Dahir AK  ,


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




thanks



Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
aug. 24
7816
1
sep. 22
2884
1
jul. 22
6251
1
jun. 22
7468
7
jun. 20
6914