Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
1624 Представления

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
1335
1
апр. 23
1516
1
мар. 23
2357
0
дек. 22
1931
1
окт. 21
3888