[FIX] project_issue: number of issues

When no stage has been defined for a project, the new issues are
set in an undefined stage(stage_id = False). Then these issues must
be counted.

opw:676985
This commit is contained in:
Goffin Simon
2016-05-19 09:30:31 +02:00
parent 8acfb0d72d
commit c286e2d5b2
+1 -1
View File
@@ -450,7 +450,7 @@ class project(osv.Model):
def _issue_count(self, cr, uid, ids, field_name, arg, context=None):
Issue = self.pool['project.issue']
return {
project_id: Issue.search_count(cr,uid, [('project_id', '=', project_id), ('stage_id.fold', '=', False)], context=context)
project_id: Issue.search_count(cr,uid, [('project_id', '=', project_id), '|', ('stage_id.fold', '=', False), ('stage_id', '=', False)], context=context)
for project_id in ids
}