Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2766 Vizualizări

Hello, I would like to know in Odoo 14 if there is any way how to make checkbox field on view form greyed out when set to False. It means to behave in the same way like common text fields when empty.

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

Please refer the code below to change the label of checkbox to grey when it is disabled.

<div>


    <label for="checkbox_field" string="ssss" style="color:black;"


       attrs="{'invisible': [('checkbox_field', '=', False)]}"/>


<label for="checkbox_field" string="ssss" style="color:grey;"


       attrs="{'invisible': [('checkbox_field', '=', True)]}"/>


<field name="checkbox_field" nolabel="1"/>


</div>

 

Regards

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
iun. 21
2923
1
sept. 24
2225
1
mai 23
2877
1
sept. 21
5448
2
feb. 16
6616