This question has been flagged

Hello, I am trying to display a new Sale Order as unread when it is viewed in the tree view.  I know it uses the 'message_unread' field to display the line as bold if the message hasn't been read yet.  This feature exists in the crm_leads tree view, and works like it should.  I noticed that this feature also exists in the Sale Order tree view, but none of the new sales orders are displayed with bold letters on the tree view.  Does anyone know why this doesnt work for Sales Orders, and what I need to do to show it properly?

here is an example of the crm_leads tree view, and a sale_order tree view

crm_lead tree view:  (works as designed)

<record model="ir.ui.view" id="crm_case_tree_view_leads">
            <field name="name">Leads</field>
            <field name="model">crm.lead</field>
            <field name="arch" type="xml">
                <tree string="Leads" fonts="bold:message_unread==True" colors="grey:state in ('cancel', 'done')">
                    <!-- Other fields are here ... -->
                    <field name="message_unread" invisible="1"/>
                </tree>
            </field>
        </record>

 

sale_order tree view: (looks like the crm_view, but doesnt show the lines in bold letters)

<record id="view_order_tree" model="ir.ui.view">
            <field name="name">sale.order.tree</field>
            <field name="model">sale.order</field>
            <field name="priority">2</field>
            <field name="arch" type="xml">
                <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')">
                    <field name="message_unread" invisible="1"/>
                    <!-- Other fields found here ... -->
                </tree>
            </field>
        </record>

 

Avatar
Discard