[project] consider cancelled tasks as completed

This commit is contained in:
Rushabh Mehta 2013-06-10 12:35:45 +05:30
parent d3d3472af5
commit c067366c98

View File

@ -65,7 +65,7 @@ class DocType:
self.doc.name)[0][0]
if total:
completed = webnotes.conn.sql("""select count(*) from tabTask where
project=%s and status='Closed'""", self.doc.name)[0][0]
project=%s and status in ('Closed', 'Cancelled')""", self.doc.name)[0][0]
webnotes.conn.set_value("Project", self.doc.name, "percent_complete",
int(float(completed) / total * 100))