Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
1560 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore Risposta migliore

Thank you very much for this answer.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
dic 23
1285
1
apr 23
1473
1
mar 23
2306
0
dic 22
1880
1
ott 21
3814