Comment 2 for bug 629332

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: Function,related fields do not get sorted

Hello all,

Function fields (related fields are a kind of function field) that are not marked as "stored" cannot be sorted, because doing it would either:
- provide inaccurate or misleading data to the user (as was the case in v5, due to sorting only visible data)
- or be extremely and needlessly expensive (computing the function for *all* records in the database, potentially of a very large size!)

This is because the data is not in the database and is computed on-the-fly, so we cannot sort on what is not there.

A workaround is to mark as "stored" the fields for which you absolutely need to be able to sort.

We will keep this issue in mind for improvement after v6.0, either by providing a more intuitive feedback to users about it, or finding another solution, but this will not be changed in v6.0

Thanks for reporting.