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.


edit sale tree view odoo 9

on 1/8/16, 3:39 AM 935 views

Helo everyone . I was looking all over but could not find , how change/edi tree view to change colour on listed orders .

In previous versions of odoo open orders was blue and done orders was black it is clear to watch the open orders list . Now on odoo 9 I have all colors the same for open orders and finished/done orders . I tried modiffy tree view but no results . Please help , if you can past here short code to add in tree view form . Thank you for your help in advance .


Jignesh Mehta

--Jignesh Mehta--
| 6 4 8
Surat, India
--Jignesh Mehta--

Jignesh Mehta
On 1/8/16, 5:37 AM

Hello Marcin,

Please add code in the <tree> tag for the Sale order:-

<tree string="Sales Orders" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">

Please add code in the <tree> tag for the Quatation:-

<tree string="Quotation" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')"> 

Hope this will works.




Nilesh Sheliya
On 1/8/16, 5:41 AM

Please see the below sample code to make tree view with different color for different state of sale order.

<?xml version="1.0"?>

<tree string="Sales Orders" decoration-bf="message_needaction==True" decoration-muted="state=='cancel'" colors="grey:state=='cancel';blue:state in ('draft','sent','sale')">

<field name="message_needaction" invisible="1"/>

<field name="name" string="Order Number"/>

<field name="date_order"/>

<field name="partner_id"/>

<field name="user_id"/>

<field name="amount_total" sum="Total Tax Included" widget="monetary"/>

<field name="invoice_status"/>

<field name="state" invisible="1"/>


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: 1/8/16, 3:39 AM
Seen: 935 times
Last updated: 1/8/16, 5:41 AM