Community mailing list archives

community@mail.odoo.com

Re: Need Help on 'Tree view' order

by
Quentin THEURET
- 03/09/2015 06:50:55
On 09/03/2015 11:48, Cy Snake 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?

You can put a context when you call your second list view and override 
the search() method of your XXXX object to change the 'order' parameter 
when the context is set with a specific value.

Regards,

-- 
Quentin THEURET

TeMPO Consulting
20, Avenue de la paix
67000 Strasbourg
France

http://www.tempo-consulting.fr
Tel : 33 (0)3 88 56 82 18
Fax : 33 (0)9 70 63 35 46