This question has been flagged
2 Replies
4532 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 .

Avatar
Discard
Best Answer

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.

Thanks,



 

 

Avatar
Discard
Best Answer

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"/>

</tree>

Avatar
Discard