[FIX] hr_attendance: use float division for worked_hours field

Used to be rounded to integer while the field is a float.
Fixes #3526
This commit is contained in:
Maria G 2014-11-09 16:11:16 -08:00 committed by Martin Trigaux
parent 94aded554c
commit fde2046d5e
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ class hr_attendance(osv.osv):
last_signin_datetime = datetime.strptime(last_signin.name, '%Y-%m-%d %H:%M:%S')
signout_datetime = datetime.strptime(obj.name, '%Y-%m-%d %H:%M:%S')
workedhours_datetime = (signout_datetime - last_signin_datetime)
res[obj.id] = ((workedhours_datetime.seconds) / 60) / 60
res[obj.id] = ((workedhours_datetime.seconds) / 60) / 60.0
else:
res[obj.id] = False
return res