Skip to Content
मेन्यू
This question has been flagged
2 Replies
1783 Views

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

Avatar
Discard
Best Answer

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

Avatar
Discard
Author Best Answer

Thank you very much for this answer.

Avatar
Discard
Related Posts Replies Views Activity
1
दिस॰ 23
1508
1
अप्रैल 23
1636
1
मार्च 23
2489
0
दिस॰ 22
2062
1
अक्तू॰ 21
4027