Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
1612 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Thank you very much for this answer.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
gru 23
1326
1
kwi 23
1510
1
mar 23
2352
0
gru 22
1926
1
paź 21
3870