Odoo Help

Welcome!

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

1

Conditional color of field??

By
Rafael
on 9/9/13, 10:26 AM 2,288 views

Hi! I have a functional field that show a calculated number. I want to show in red this number if is negative, and black if is positive. How can i do it? Thanks!

3

Gopakumar N G

--Gopakumar N G--
1198
| 5 3 7
Cochin, India
--Gopakumar N G--

Senior Software Engineer at BroadTech IT Solutions Pvt. Ltd.

Gopakumar N G
On 9/9/13, 10:40 AM

In the tree view you can add colors to some records based on a condition. For example

<tree string="Student" fonts="bold:exam_reg_no=='1001'" colors="blue:admit_no=='1';">
                <field name="partner_id"/>
                <field name="admit_no"/>
                <field name="exam_reg_no"/>
                <field name="programme_id"/>
                <field name="area_id"/>
                <field name="grade_id"/>
                <field name="division_id"/>
 </tree>

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 9/9/13, 10:26 AM
Seen: 2288 times
Last updated: 10/15/15, 11:14 AM