diff options
| author | Maria G <mariagr@europeanstonetile.com> | 2014-11-09 16:11:16 -0800 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2014-11-26 16:46:26 +0100 |
| commit | fde2046d5ed7f4f904af5df63117b60cbb7d72cc (patch) | |
| tree | 364de7618cffd1f62e7d2cd4c2cfda213044af97 | |
| parent | 94aded554c34917fd12d5b9326767fa792581c4d (diff) | |
[FIX] hr_attendance: use float division for worked_hours field
Used to be rounded to integer while the field is a float.
Fixes #3526
| -rw-r--r-- | addons/hr_attendance/hr_attendance.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py index 4887d41a52c..6b0960feaaf 100644 --- a/addons/hr_attendance/hr_attendance.py +++ b/addons/hr_attendance/hr_attendance.py @@ -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 |
