[Trunk] Group By function field should be display aggregate instead of sum.

Bug #1002851 reported by wowas
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Low
OpenERP's Framework R&D

Bug Description

It is very difficult made GROUP BY in TREE VIEW or in GRAPH VIEW, if field calculate from other fields.
For example we have table with following fields:
date (Date of production)
prod_qty (Total Quantity produced items)
reject_qty (Quantity of rejected items)
quality (Calculated field: quality = reject_qty/prod_qty)

If we try GROUP BY 'date' then for some date we get:

PROD_QTY = SUM(prod_qty of the same date)
REJECT_QTY = SUM(reject_qty of the same date)
QUALITY = SUM(quality of the same date)

But for agregate QUALITY = REJECT_QTY/PROD_QTY = SUM(reject_qty of the same date)/SUM(prod_qty of the same date)
Because it no the same as SUM(quality of the same date), need add extra code (for example rewrite function read_group())

It will be more cool if we have functional attribute for field, that will describe custom agregate function other than SUM().

wowas (wowas18)
affects: openobject-client → openobject-client-web
affects: openobject-client-web → openobject-server
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello wowas ,

Sorry for Inconvenience , But It's not totally duplicate of the bug : 1001659
and I agree with you It should be display a aggregate rather then sum.
So I am Confirming this issue for Framework.

Thank you!

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: New → Confirmed
summary: - [6.2] Need functional attribute for group
+ [Trunk] Group By function field should be display aggregate instead of
+ sum.
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.