BaseMode.read_group sums numeric fields unconditionally

Bug #1166886 reported by Richard Lewis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP's Framework R&D
OpenERP Community Backports (Server)
New
Undecided
Unassigned

Bug Description

In the ORM, BaseModel.read_group, fields of type INTEGER or FLOAT have aggregations computed automatically using either the column's supplied grouping_operator or SUM. It would be better if this behaviour were optional, or at least could be disabled.

The attached patch adds an 'allow_aggreation' parameter to the _column class constructor which limits aggregation in read_group to only those columns having this property as True. For fields.integer and fields.float, is it set to True by default meaning that current behaviour will not change.

Related branches

Revision history for this message
Richard Lewis (richard-lewis-r) wrote :
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Wishlist
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.