Somesh Khare(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-574713-skh into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-574713-skh/+merge/105441

Hello Sir,

[Fix]: Idea: Count of comments and Count of votes in Idea should start from 0.

When you create new Idea, Count of Comments and Count of Vote fields are 
automatically become 1( See From Statistics tab of Idea), Even the Idea is in 
New state(No votes or comments Done). Counter for both the fields should be 0 
when no comments or votes or if the state of the idea is New.

This branch fixes this issue.

Kindly review the branch and please share your views on it.

Thanks,
Somesh Khare
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-574713-skh/+merge/105441
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-574713-skh.
=== modified file 'idea/idea.py'
--- idea/idea.py	2011-12-31 07:57:20 +0000
+++ idea/idea.py	2012-05-11 06:35:22 +0000
@@ -105,7 +105,7 @@
         if not ids:
             return {}
 
-        sql = """SELECT i.id, COUNT(1)
+        sql = """SELECT i.id, COUNT(v.idea_id)
            FROM idea_idea i LEFT OUTER JOIN idea_vote v ON i.id = v.idea_id
             WHERE i.id IN %s
             GROUP BY i.id
@@ -125,7 +125,7 @@
         if not ids:
             return {}
 
-        sql = """SELECT i.id, COUNT(1)
+        sql = """SELECT i.id, COUNT(c.idea_id)
            FROM idea_idea i LEFT OUTER JOIN idea_comment c ON i.id = c.idea_id
             WHERE i.id IN %s
             GROUP BY i.id

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to