- default_order
A comma-separated list of fields names that overrides the ordering defined on the model through the
_orderattribute.To inverse the sorting order of a field, postfix it with
desc, separated by a space.Example
<list default_order="sequence,name desc"> ... </list>
- Requirement
Optional
- Type
- Default
''
Editorial note
This page (Odoo 20.0 documentation) is translated from the Odoo 20.0 Enterprise documentation. Developer terms are unified as 模型 (model), 字段 (field), 视图 (view), 记录规则 (record rule) and 继承 (inheritance). Code samples were checked against the 20.0 source tree; APIs changed across versions, and syntax valid on 17.0 and earlier may fail outright on 20.0, so treat this page as the reference when migrating. See our developer notes for scaffolding, migration scripts and test runners. The 20.0 source and upstream docs prevail.
Content adapted from the Odoo S.A. documentation under CC BY-SA 4.0; copyright remains with Odoo S.A. This is a third-party site, not an Odoo property. Where this translation differs from upstream, the odoo.com documentation prevails. For edition comparisons see Community vs Enterprise.