Merge lp:~openerp-dev/openobject-addons/6.1-opw-574713-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Approved
Approved by: Vinay Rana (OpenERP)
Approved revision: 6795
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-574713-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 21 lines (+2/-2)
1 file modified
idea/idea.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-574713-skh
Reviewer Review Type Date Requested Status
Vinay Rana (OpenERP) (community) Approve
Naresh(OpenERP) Pending
Review via email: mp+105441@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

the propose patch fixes the default value.

review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Not Relevant on Trunk (means that architecture on trunk has changed and so this bug has no meaning anymore). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh

Unmerged revisions

6795. By Somesh Khare

[FIX] Idea: Count of comments and Count of votes in Idea should start from 0(Case: Ref 574713)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
105 if not ids:105 if not ids:
106 return {}106 return {}
107107
108 sql = """SELECT i.id, COUNT(1)108 sql = """SELECT i.id, COUNT(v.idea_id)
109 FROM idea_idea i LEFT OUTER JOIN idea_vote v ON i.id = v.idea_id109 FROM idea_idea i LEFT OUTER JOIN idea_vote v ON i.id = v.idea_id
110 WHERE i.id IN %s110 WHERE i.id IN %s
111 GROUP BY i.id111 GROUP BY i.id
@@ -125,7 +125,7 @@
125 if not ids:125 if not ids:
126 return {}126 return {}
127127
128 sql = """SELECT i.id, COUNT(1)128 sql = """SELECT i.id, COUNT(c.idea_id)
129 FROM idea_idea i LEFT OUTER JOIN idea_comment c ON i.id = c.idea_id129 FROM idea_idea i LEFT OUTER JOIN idea_comment c ON i.id = c.idea_id
130 WHERE i.id IN %s130 WHERE i.id IN %s
131 GROUP BY i.id131 GROUP BY i.id