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.
Pertanyaan ini telah diberikan tanda
1
Balas
4315
Tampilan
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
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
|
0
Jun 21
|
4712 | ||
|
Add button at header in tree view using xpath
Diselesaikan
|
|
1
Sep 24
|
4488 | |
|
|
1
Mei 23
|
5153 | ||
|
|
1
Sep 21
|
7625 | ||
|
|
2
Feb 16
|
8559 |