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
мая 18
|
6115 | ||
|
|
6
сент. 17
|
11200 | ||
|
|
0
июн. 15
|
5391 | ||
|
|
3
июн. 15
|
9836 | ||
|
|
1
мар. 15
|
6314 |