Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
1610 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor Nejlepší odpověď

Thank you very much for this answer.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
pro 23
1325
1
dub 23
1508
1
bře 23
2351
0
pro 22
1925
1
říj 21
3870