We want to have certain columns in a tree view sorted in an ascending way. In order to achieve it I tried to edit the tree view under Manufacturing Orders (Edit Tree View (Developers Mode)) and I added the following line
<tree default_order='x_Delivery_Date_To_FSLSales'>
It now reads:
<?xml version="1.0"?><tree fonts="bold:message_unread==True" colors="blue:state in ('draft','confirmed');red:date_planned<current_date and state not in ('done','cancel');black:date_planned>=current_date;gray:state in ('done','cancel') " string="Manufacturing Orders">
<tree default_order='x_Delivery_Date_To_FSLSales'>
</tree>
<field name="x_Delivery_Date_To_FSLSales"/>
<field name="sale_ref"> </field>
</tree>
It comes up with a
ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition
Can someone please help out on how to have a tree view sorted according to a specific column. I have seen various answers but could not figure out how to edit the view definition in order to achieve this.