← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 765559] Re: locations cannot be sorted

 

Here is a more detailed explanation on sorting issues in v5 and v6. I would like to be sure everyone understands this completely, so we can all save time next time:

Sorting in v5 was performed *client-side*, and only on the *currently displayed records*. This was not only wrong but very misleading. Imagine that you see the 80 first records sorted by name, and then you click on a date field hoping to see the latest or oldest entries... Result: you still see the same 80 records, just reordered by date. And you don't even know that there are earlier/older records! Totally incorrect!
So in v6 sorting is performed server-side, which is much better and safer. However this correctness comes with a caveat: in some cases sorting is not possible. Indeed, it is not possible to sort on function fields that are not "stored" or do not provide a smart "reverse function", because the only way to do it would be to compute the function field for the whole table first! Obviously this solution makes no sense for an ERP where tables can contain millions of records, and as we've seen, sorting client-side (even for function fields) is not better: incorrect and misleading. So we have the best trade-off at the moment, because correctness is much more important.

Of course we can improve the situation incrementally by making some
function fields "stored" or providing "reverse functions", at least for
the ones that are used in list views and are useful. But storing
function fields is not always a minor decision - cache-invalidation and
performance are of concern here.

Please keep the above in mind when reflecting about sorting questions.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/765559

Title:
  locations cannot be sorted

Status in OpenERP Modules (addons):
  Confirmed

Bug description:
  the tree view of stock locations (not location structure - this one is OK) results in a list order by    
   _order = 'parent_left'
  which is not human readable / undertandable

  together with the fact that function fields (Location Name = complete_name)  can't be sorted this list is not user friendly at all
  (sorting worked in V5)

  BTW 
  IMHO the search view should have buttons for all "usages" 
  as well as a search field for parent location

  please consider the missing sorting and filtering of function fields
  as a major issue for migration of complex installations to v6


Follow ups

References