Odoo Help


Is there a way to change text color on a specific field in list (Tree) view?

John Baldwin
on 2/17/15, 4:54 PM 768 views

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"/>

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?


Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

On 2/18/15, 5:25 AM

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..

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/17/15, 4:54 PM
Seen: 768 times
Last updated: 3/16/15, 8:10 AM