lp:~numerigraphe/openobject-server/trunk-read_group-having

Created by Numérigraphe and last modified

Abandoned because refused upstream, but other ways were probably implemented in between

This branch adds a new parameter named "having" to orm.read_group(), that lets clients pass the information to filter the grouped records based on the sum (or avg, etc.) of a value.
This parameter should contain a domain-like list of tuples, that the ORM will use to add a "HAVING" clause to the SQL query.

For an example of how this feature is useful, please see lp:~numerigraphe/openobject-addons/trunk-stock-analysis-filter-zero, where we use the "having" parameter to filter out results with quantity = 0 in stock analysis. This can only be done after the records have been grouped (the goods may have gone in then out of a location).

This is only really useful if clients support it too. Support for the GTK client has been added in lp:~numerigraphe/openobject-client/trunk-read_group-having.

Get this branch:
bzr branch lp:~numerigraphe/openobject-server/trunk-read_group-having
Only Numérigraphe can upload to this branch. If you are Numérigraphe please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Numérigraphe
Project:
Odoo Server (MOVED TO GITHUB)
Status:
Abandoned

Recent revisions

4151. By Numerigraphe - Lionel Sausin <email address hidden>

[FIX] properly initialize context and having in read_group()

4150. By Philippe Rossi & Lionel Sausin

[IMP] orm: add a 'having' parameter to read_group() to filter grouped records

4149. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4148. By Raphael Collet (OpenERP)

[MERGE] trunk-remove_group_extended-rco (remove group extended view)

4147. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4146. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4145. By Xavier (Open ERP)

[REM] idiotic default value for type field in ir_actions table

4144. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4143. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4142. By Xavier (Open ERP)

[FIX] previous fix: actual module should be __builtin__

apparently we do weird things with __builtins__, on my machine it's consistently an alias to the __builtin__ importable module, but in the server it's a dict

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:openobject-server
This branch contains Public information 
Everyone can see this information.

Subscribers