I can change an entire row's color base on the comparison vaue of a boolean. I've done that.
<tree string="Contacts" colors="red:dnc==True">
<field name="display_name"/>
<field name="function" invisible="1"/>
<field name="street"/>
<field name="street2"/>
<field name="city"/>
<field name="state_id"/>
<field name="zip"/>
<field name="dnc"/>
<field name="phone"/>
<field name="email"/>
<field name="user_id" invisible="1"/>
<field name="is_company" invisible="1"/>
<field name="country_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
</tree>
BUT what I really want is to change the color of just one specific field (phone) based on that boolean's value (dnc). Any ideas?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
No I dont think you can do it, but you can change the color for entire records based on criteria...
However, without using any criteria if you wish to set colors for few fields, then yes you can do it...
In form view, I have acheived setting color for few selected fields, by creating my own widget in js, and referenced the same against those fields using "option",
So you can also try the same, see if it works for you too in Tree view..
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký