Function,related fields that are not stored cannot be used to sort

Bug #629332 reported by Ferdinand on 2010-09-03
This bug affects 19 people
Affects Status Importance Assigned to Milestone
OpenERP Publisher's Warranty Team

Bug Description

base_contact installed

sales / address book / contacts

clicking on each field does not sort the date

Related branches

affects: openobject-addons → openobject-server
summary: - [trunk] base_contact - can not sort main employer, main function
+ Function,related fields do not get sorted
Changed in openobject-server:
status: New → Confirmed

Ordering on Products is still broken. ie ordering Products by 'Real Stock', Virtual Stock, List Price columns

Changed in openobject-server:
milestone: none → 6.0-rc2
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
Changed in openobject-server:
importance: Undecided → Medium

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.

Changed in openobject-server:
importance: Medium → Wishlist
summary: - Function,related fields do not get sorted
+ Function,related fields that are not stored cannot be used to sort
Ferdinand (office-chricar) wrote :

Please keeep in mind end users:
their experience is that clicking on a column header is to get a sorted result
if the programm does not provide the functionality a popup should say so.
doing nothing is not self explanatory and causes endless requests.

Ferdinand (office-chricar) wrote :

trunk - now we see the sort indicator - but records are not sorted

Florent (florent.x) wrote :

Thank you for the fix.

I did port the fix for the 6.1 branch (see related branch above).

Changed in openobject-server:
assignee: OpenERP's Framework R&D (openerp-dev-framework) → OpenERP Publisher's Warranty Team (openerp-opw)
milestone: 6.0-rc2 → none
tags: added: maintenance
Ferdinand (office-chricar) wrote :

sort for function and related fields still not working - it's a shame..

a patch for this was already available for 6.0

Ferdinand (office-chricar) wrote :

credits to Panos

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers