Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
1635 Переглядів

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.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
груд. 23
1346
1
квіт. 23
1524
1
бер. 23
2365
0
груд. 22
1941
1
жовт. 21
3893