Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2646 Prikazi

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.

Avatar
Opusti
Best Answer

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

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
jun. 21
2804
1
sep. 24
2069
1
maj 23
2709
1
sep. 21
5312
2
feb. 16
6503