Community mailing list archives

community@mail.odoo.com

Re: Need Help on 'Tree view' order

by
n.schmitt
- 03/09/2015 18:17:05
Quoting the doc present there: https://www.odoo.com/documentation/8.0/reference/views.html#lists

default_order: overrides the ordering of the view,
replacing the model’s default order.
The value is a comma-separated list of fields,
postfixed by desc to sort in reverse order:

    

I have never tried it though.

Please tell us how it goes!

Cordially,
Sathors

On 09/03/15, Zou Haojun wrote:
> You need two make objects if you want two tree view. Each class can only has one _order
> On Mon, Mar 9, 2015 at 11:48 AM, Cy Snake < cysnake4713@gmail.com [1] > wrote:
> Hello guys,
> I defined a model like this:
> XXXX:
> _order = 'create_date desc'
> 
> then, This model have two list views, one need order by 'create_date
> desc' , but another one need order by 'p_date desc' , is ODOO. V8
> surpport this kind of behavior?
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59 [2]
> Post to: mailto: community@mail.odoo.com [3]
> Unsubscribe: https://www.odoo.com/groups?unsubscribe [4]
> 
> 
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
> 
> 
> 
> [1] mailto:cysnake4713@gmail.com
> [2] https://www.odoo.com/groups/community-59
> [3] mailto:community@mail.odoo.com
> [4] https://www.odoo.com/groups?unsubscribe