Odoo Help


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.


Changing background-color row tree view

Jose M. González
on 2/22/16, 7:42 AM 757 views


Someone knows how to change background-color of file in tree view with one condition?




| 6 3 8
Ahmedabad, India

Working as an OpenERP/Odoo developer both experience in web and addons. you can contact me at:

E-mail : parikshitvaghasiya@gmail.com

Blog : parikshitvaghasiya.blogspot.in

Stackoverflow : http://stackoverflow.com/users/5089106/parikshit-vaghasiya

On 2/22/16, 8:48 AM


Try this in your css file...
.openerp .oe_list_content > tbody > tr:nth-child(odd) {

   background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6);

  Hope this will help you.

Jose M. González
On 2/22/16, 11:06 AM

thank you ,

With This code i can change the color in the tree view but , how can i put the condition ?

for example:

if ('state' == 'draft') {

    //apply one style

} else{

    // apply other style


i should do it from javascript?

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

1 follower(s)


Asked: 2/22/16, 7:42 AM
Seen: 757 times
Last updated: 2/28/16, 1:27 AM