Odoo Help

1

Conditional color of field??

By
Rafael
on 9/9/13, 10:26 AM 3,066 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
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>

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.

Register

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

0 follower(s)

Stats

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