Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: how can we sort tree from xml

by
Olivier Dony (odo)
- 09/22/2014 03:38:48
On 09/19/2014 04:29 PM, abhishek jaiswal wrote:
> i am trying to make two views for same model and wanted to sort both views with
> different criteria is it possible

Yes, as of Odoo 8 you can simply add a `default_order` attribute in the view 
definition, to override the default ordering of the model. The syntax for this 
attribute is the same as the `_order` attribute of your model, e.g.:

    
      ...
    

For more details see the pull request that introduced this feature:
   https://github.com/odoo/odoo/pull/520

Cheers,