openerp-expert-framework team mailing list archive
-
openerp-expert-framework team
-
Mailing list archive
-
Message #00530
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!