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

What is the equivalent attribute for attrs="{'invisible': [('one2many_field', '=', [])]}" , in odoo17?


I use invisible="assignment_ids == []" and invisible="assignment_ids == ''" and invisible="assignment_ids == False" 

But not working.

アバター
破棄
最善の回答

Hi Hery,

You can refer to this:

in V16

<field name="categ_ids" attrs="{'invisible': [('categ_ids', '=', [])]}"/>


in V17

<field name="categ_ids" invisible="not categ_ids" options="{'icon': 'fa fa-tag', 'color_field': 'color'}"/>


Hope it helps


アバター
破棄
最善の回答

try this way:

field name="your_field_name" invisible="['|', ('assignment_ids', '=', False), ('assignment_ids', '=', [(6, 0, [])])]"/>

In Odoo 17, the equivalent attribute for attrs="{'invisible': [('one2many_field', '=', [])]}" is attrs="{'invisible': [('one2many_field', '=', [(6, 0, [])])]}". This notation (6, 0, []) represents an empty list for a one2many field.

アバター
破棄
関連投稿 返信 ビュー 活動
3
4月 25
907
4
5月 25
2588
2
5月 25
5972
1
3月 25
1722
4
3月 25
4580