bugfix for float division error

bzr revid: hda@tinyerp.com-20080903072115-makv4bthxx4t7tcu
This commit is contained in:
hda@tinyerp.com 2008-09-03 12:51:15 +05:30
parent 2b8dc94f9c
commit 3dcc8819e5
1 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,10 @@ class project(osv.osv):
for project in self.browse(cursor, user, ids, context=context):
tot = 0.0
if project.state not in ('cancelled'):
tot += project.effective_hours * 100.0 / project.planned_hours
try:
tot += project.effective_hours * 100.0 / project.planned_hours
except:
pass
res[project.id] = tot
return res