openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #22505
[Bug 1007703] Re: Can't "group by" the "integer" field
I suggest that correction instead :
=== modified file 'openerp/osv/orm.py'
--- openerp/osv/orm.py 2013-01-29 11:47:58 +0000
+++ openerp/osv/orm.py 2013-01-29 14:31:37 +0000
@@ -2549,6 +2549,7 @@
aggregated_fields = [
f for f in fields
if f not in ('id', 'sequence')
+ if f not in groupby_list
if fget[f]['type'] in ('integer', 'float')
if (f in self._columns and getattr(self._columns[f], '_classic_write'))]
for f in aggregated_fields:
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1007703
Title:
Can't "group by" the "integer" field
Status in OpenERP Server:
Fix Committed
Bug description:
In my test model, I defined a integer field, and in "search view" xml,
I put it in "Group By ..." selection..
But, It's not work fine....
What's wrong with it?
and I caputre the HTTP package
I found
the /res/group/read json result is:
{"jsonrpc": "2.0", "id": "r148", "result": [{"week": 22, "__context":
{"group_by": []}, "week_count": 70, "__domain": [["week", "=",
1542L]]}, {"week": 23, "__context": {"group_by": []}, "week_count":
105, "__domain": [["week", "=", 3824L]]}]}
I think the corect result is:
{"jsonrpc": "2.0", "id": "r148", "result": [{"week": 22, "__context":
{"group_by": []}, "week_count": 70, "__domain": [["week", "=", 22]]},
{"week": 23, "__context": {"group_by": []}, "week_count": 105,
"__domain": [["week", "=", 23]]}]}
and the "1542L" is the sum of "week" integer field. Not the field's ID...
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1007703/+subscriptions
References