Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
1649 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Autor Beste Antwort

Thank you very much for this answer.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Dez. 23
1362
1
Apr. 23
1530
1
März 23
2370
0
Dez. 22
1955
1
Okt. 21
3900