Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
1627 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor Cel mai bun răspuns

Thank you very much for this answer.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
dec. 23
1341
1
apr. 23
1520
1
mar. 23
2359
0
dec. 22
1932
1
oct. 21
3889