4d2aa27157cf1a4ebd6a360a2309dda8da593ce5
Up until now, it was impossible to specify the default ordering on models created manually. This could somewhat be bypassed by specifying the ordering of records on views themselves, but this has one main drawback: when using a relational field that targets a custom model as a group-by key, the ordering defaulted to the id of the custom record. For example, if I create a custom field on partners that points to a custom model 'x_grade' on which an 'x_sequence' field exists, I could order my grade in their own list view according to their sequence, but any read on partners grouped by this 'x_grade_id' field would order the returned groups by id while I would prefer to have them ordered according to the 'x_sequence' field. This commit introduces a new field 'default_order' on the ir.model model that can store this default ordering clause (as an SQL expression). Co-Authored-By: Raphaël Collet <rco@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%