openerp-expert-framework team mailing list archive
-
openerp-expert-framework team
-
Mailing list archive
-
Message #01205
[Bug 557326] Re: Search for disctint values using the ORM
Has this been implemented already?
--
You received this bug notification because you are a member of OpenERP
Framework Experts, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/557326
Title:
Search for disctint values using the ORM
Status in OpenERP Server:
Confirmed
Bug description:
Answers for Question #106692 indicate that for the moment we can't do a "SELECT DISTINCT" using the ORM : see https://answers.launchpad.net/openobject-addons/+question/106692
There are cases where this would be useful (like searching the order ids in order lines), so I propose we add a new parameter "distinct=False" to the read() method of th OSVs.
When set to True, it would return distinct tuples only.
It seems easy to add in osv using a SELECT DISTINCT statement.
It may be a bit more tricky in osv_memory, and it will run slower of course, and none sane will use it there I suppose, so we should just throw a "not implemented" exception I guess.
Lionel
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/557326/+subscriptions