跳至內容
選單
此問題已被標幟
2 回覆
1622 瀏覽次數

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
1333
1
4月 23
1516
1
3月 23
2356
0
12月 22
1931
1
10月 21
3887