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

Bug #629332 reported by Ferdinand
132
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP Publisher's Warranty Team

Bug Description

base_contact installed

sales / address book / contacts

clicking on each field does not sort the date

Tags: maintenance

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
Revision history for this message
Julian Robbins (joolsr) wrote : Re: Function,related fields do not get sorted

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
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

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
Revision history for this message
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.

Revision history for this message
Ferdinand (office-chricar) wrote :

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

Revision history for this message
Ferdinand (office-chricar) wrote :
Revision history for this message
Florent (florent.x) wrote :

Thank you for the fix.

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

https://code.launchpad.net/~florent.x/openobject-server/6.1-fallback-search-sort/+merge/124963

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
Revision history for this message
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

Revision history for this message
Ferdinand (office-chricar) wrote :

credits to Panos

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.