summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2017-03-01 11:56:07 +0100
committerGoffin Simon <sig@odoo.com>2017-03-01 15:39:48 +0100
commit5d27b3d6c0d7a92796ffda5dc18c2eea2e343df5 (patch)
tree0dc7f535b1c8cebac9638b7a42ef25a2578101b3
parent7abeace7708b21fb96cadfb7be6589649de8bd95 (diff)
[FIX] hr_attendance: Wrong timezone
The timezones are already managed in the JS. So on the attendance check in/out screen when a user clocked out after 8 hrs he got a message saying that he has been in for more than 12 hrs. opw:710161
-rw-r--r--addons/hr_attendance/models/hr_employee.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/addons/hr_attendance/models/hr_employee.py b/addons/hr_attendance/models/hr_employee.py
index a4dac9883ea..dba3d2a3ba4 100644
--- a/addons/hr_attendance/models/hr_employee.py
+++ b/addons/hr_attendance/models/hr_employee.py
@@ -88,9 +88,6 @@ class HrEmployee(models.Model):
self.ensure_one()
action_message = self.env.ref('hr_attendance.hr_attendance_action_greeting_message').read()[0]
action_message['previous_attendance_change_date'] = self.last_attendance_id and (self.last_attendance_id.check_out or self.last_attendance_id.check_in) or False
- if action_message['previous_attendance_change_date']:
- action_message['previous_attendance_change_date'] = \
- fields.Datetime.to_string(fields.Datetime.context_timestamp(self, fields.Datetime.from_string(action_message['previous_attendance_change_date'])))
action_message['employee_name'] = self.name
action_message['next_action'] = next_action