From 2d6cadb7a5895f382d59e4181c697a5fccd3b458 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 4 Mar 2013 14:18:59 +0100 Subject: [PATCH] [FIX] project_issue: in kanban view of project, display only the number of unclosed issues because the number total of issues is meaningless bzr revid: qdp-launchpad@openerp.com-20130304131859-4kiyz2lez1ywhkks --- addons/project_issue/project_issue.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index f5a08b37aeb..8639508d66b 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -558,12 +558,13 @@ class project(osv.osv): res = dict.fromkeys(ids, 0) issue_ids = self.pool.get('project.issue').search(cr, uid, [('project_id', 'in', ids)]) for issue in self.pool.get('project.issue').browse(cr, uid, issue_ids, context): - res[issue.project_id.id] += 1 + if issue.state not in ('done', 'cancel'): + res[issue.project_id.id] += 1 return res _columns = { 'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), - 'issue_count': fields.function(_issue_count, type='integer'), + 'issue_count': fields.function(_issue_count, type='integer', string="Unclosed Issues"), } def _check_escalation(self, cr, uid, ids, context=None):