Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
17916 Tampilan

I was wondering if there is a way to set the order_by for a specific tree view in the xml code.  Is there a way to do this?

Avatar
Buang
Jawaban Terbai

There is a default_order attribute

https://www.odoo.com/documentation/8.0/reference/views.html#lists

Avatar
Buang
Jawaban Terbai

You can do this in your module's action code (or inherit an already existing action). 

Set it in the context with 'order'.  To order it by the Status field for instance (which is 'state' in the database):

 <record id="action_unique_identifier" model="ir.actions.act_window">
             <!-- a bunch of fields -->
            <field name="context">{'order': 'state'}</field>

 

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Mei 18
4239
6
Sep 17
8306
0
Jun 15
3880
3
Jun 15
8038
1
Mar 15
4495