This module allows a search to order by a non-stored related field.
auto_awesome What this module does
AI-generated from the code · Odoo 14.0Allows list views to be sorted by related fields that are not stored in the database, such as a customer's country shown on a sales order.
This is a technical tool that changes how Odoo sorts records in list views. Normally, Odoo can only sort by fields that are physically stored in the database. This module lets developers mark certain related fields as sortable, so users can click the column header and sort by them.
- It extends the base model, so the behaviour is available everywhere in Odoo.
- A developer adds field names to a special list on a model; those fields then become sortable in list views.
- When a user sorts by one of these fields, Odoo automatically builds the necessary database joins to reach the related record and order by its value.
- The module also marks those fields as sortable in the field definitions, so the sorting option appears in the user interface.
- It supports translated fields and handles ascending and descending order.
No new menus, screens, or buttons are added. The change is invisible until a developer configures a model to use it. It touches the base model and the way list views generate their sorting instructions.
Depends on
Models and fields (1)
- base · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 14.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 14.0
Confirmed on 2026-11-03 in branch 14.0 of OCA/server-tools.
terminal Installation and usage
OCA documentation · Odoo 14.0Usage
Source · Odoo 14.0In any model where you have a non-stored related field, you can make it sortable:
class ResPartner(models.Model):
_inherit = "res.partner"
country_name = fields.Char(related="country_id.name")
# make some non-stored related fields sortable
_order_by_related = ["country_name"]No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.