This question has been flagged
1 Reply
4603 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"/>
                    </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?

Avatar
Discard
Best Answer

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

Avatar
Discard