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

Hi good day everyone,



 I hope all is well. I just want to ask how to hide and unhide the trash icon on a one2many field in odoo 10 based on a condition.


Thank you very much in advance.


Sincerely yours,

​Jhonnel

アバター
破棄
最善の回答

Hi,

To hide and unhide the trash icon on a one2many field in Odoo 10 based on a condition, you can use the attrs attribute to make the icon invisible based on the specified condition:

attrs="{'invisible': [(condition)]}".

For example:
<button name="unlink" type="object" icon="fa-trash" string="Delete" attrs="{'invisible': [('your_boolean_field', '=', False)]}" />


Hope it helps

アバター
破棄
著作者 最善の回答

Thank you very much for this answer.

アバター
破棄
関連投稿 返信 ビュー 活動
1
12月 23
1346
1
4月 23
1524
1
3月 23
2365
0
12月 22
1941
1
10月 21
3893