コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
17936 ビュー

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?

アバター
破棄
最善の回答

There is a default_order attribute

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

アバター
破棄
最善の回答

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>

 

アバター
破棄
関連投稿 返信 ビュー 活動
2
5月 18
4271
6
9月 17
8325
0
6月 15
3890
3
6月 15
8052
1
3月 15
4506