Order by non-stored related fields
Project description
This module allows a search to order by a non-stored related field.
Table of contents
Usage
In 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"]
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
Tom Blauwendraat <tblauwendraat@therp.nl>
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/server-tools project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.