[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
This commit is contained in:
Goffin Simon
2017-03-01 15:39:48 +01:00
parent 7abeace770
commit 5d27b3d6c0
@@ -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