跳至内容
菜单
此问题已终结
2 回复
1652 查看

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
1377
1
4月 23
1533
1
3月 23
2375
0
12月 22
1959
1
10月 21
3901