[Bug 557326] Re: Search for disctint values using the ORM

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

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

  Search for disctint values using the ORM

Status in OpenERP Server:

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.

To manage notifications about this bug go to:

Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp