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
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
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
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
Thank you very much for this answer.
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|  | 1 dic 23  | 1975 | ||
|  | 1 apr 23  | 2007 | ||
|  | 1 mar 23  | 2950 | ||
|  | 0 dic 22  | 2543 | ||
| 
            
                INSTALLING ODOO 10C ERROR
            
            
                    Risolto
            
         |  | 1 ott 21  | 4461 |