Toggle navigation

Base order by related

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

Authors

  • Therp BV

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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:

thomaspaulb

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.