Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
1629 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Auteur Beste antwoord

Thank you very much for this answer.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
dec. 23
1341
1
apr. 23
1522
1
mrt. 23
2360
0
dec. 22
1933
1
okt. 21
3890