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

color differentiating tree view

By
Milva Joy
on 4/15/15, 7:37 AM 1,058 views


how to differentiate rows by color code based on a condition?

1
Alby Antony
On 4/15/15, 7:38 AM

these links could help you to do that

http://stackoverflow.com/questions/25699625/how-to-color-a-field-in-tree-view-with-today-as-filter

https://www.odoo.com/forum/help-1/question/change-tree-color-with-field-function-17133

https://www.odoo.com/forum/help-1/question/how-to-add-css-to-any-row-in-a-tree-view-based-on-a-condition-51015

0

Here is example of how you can set colors and fonts in tree view


<record id="todo_app.view_tree_todo_task" model="ir.ui.view">
  <field name="name">To-do Task Tree</field>
  <field name="model">todo.task</field>
  <field name="arch" type="xml">
    <tree editable="bottom"colors="gray:is_done==True" fonts="italic: state!='open'" delete="false">
      <field name="name"/>
      <field name="user_id"/>
    </tree>
   </field>
</record>


Cheers

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)

Stats

Asked: 4/15/15, 7:37 AM
Seen: 1058 times
Last updated: 4/15/15, 11:30 AM