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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
2783
查看
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
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
0
6月 21
|
2973 | ||
|
1
9月 24
|
2260 | ||
|
1
5月 23
|
2906 | ||
|
1
9月 21
|
5494 | ||
|
2
2月 16
|
6649 |