Adding a way to select distinct values seems like an interesting
improvement post-v6, along with search_read and the likes..

Thanks for the suggestion

** Changed in: openobject-server
       Status: New => Confirmed

** Changed in: openobject-server
     Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)

-- 
Search for disctint values using the ORM
https://bugs.launchpad.net/bugs/557326
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject 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





_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to