This question has been flagged
1 Reply
11941 Views

I created a tree view in xml. How can I specify the field that should be used as sorting field (and add if it should be ascending or descending)? Right now, I think the database ID is used, but I didn't specify that.

 

Avatar
Discard
Best Answer

Hi,

Odoo is taking "_order" member to manage default order by. So, you have to just manage "_order" member of your model. You will get all data in your list according to that order. thats it. I hope it will help you. 

Avatar
Discard