コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2298 ビュー

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

i have an error

アバター
破棄

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

著作者
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


最善の回答

Hi Abdifitah Dahir AK  ,


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




thanks



アバター
破棄
関連投稿 返信 ビュー 活動
1
8月 24
7608
1
9月 22
2676
1
7月 22
6055
1
6月 22
7180
7
6月 20
6676