Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2648 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
giu 21
2813
1
set 24
2082
1
mag 23
2722
1
set 21
5320
2
feb 16
6506