← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 765559] Re: locations cannot be sorted

 

On Wednesday 27 April 2011, you wrote:
> Sorting in v5 was performed *client-side*, and only on the *currently
> displayed records*. 
>...
> Please keep the above in mind when reflecting about sorting questions.

++

I can only see this problem improved[1] after some major refactoring of 
osv/fields.py .
We have already had conversations in the community days about breaking that 
big monster code into smaller, more modular, parts. Along with that, I can 
imagine making provisions for smarter fields, that will have sort/group/search 
support along with the traditional get/set functions[2]. I reckon, if we try 
to fix now only one part of the problem, we will make our life harder for the 
rest of the issues.

My suggestion has always been to implement more SQL magic in the framework[3], 
and let the higher level code (the addons and their orm models, that is) not 
worry about the db, not need to call cr.execute() ever.


[1] not entirely fixed, because there will always be remaining fields w/o 
reverse function.
[2] some of this is already there, but only in pure python, in a rather crude 
way so far.
[3] yes, postgres specific, tricks that only this db can do. (example: 
windowing functions, stored procedures, recursive queries)
-- 
Say NO to spam and viruses. Stop using Microsoft Windows!

-- 
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


References