commit
6bc5a97534
|
|
@ -319,12 +319,14 @@ class HrAttendanceReport(models.Model):
|
|||
total_absent += attendance.plan_hours
|
||||
if attendance.calendar_id.is_full_day:
|
||||
total_absent += attendance.calendar_id.break_duration
|
||||
if lateness_reasons:
|
||||
lateness_hours_by_hr += attendance.plan_hours + attendance.calendar_id.break_duration
|
||||
elif attendance.sequence == 1:
|
||||
total_absent += attendance.calendar_id.shift_one_break_duration
|
||||
if lateness_reasons:
|
||||
lateness_hours_by_hr += attendance.plan_hours + attendance.calendar_id.shift_one_break_duration
|
||||
elif attendance.sequence == 2:
|
||||
total_absent += attendance.calendar_id.shift_two_break_duration
|
||||
if lateness_reasons:
|
||||
lateness_hours_by_hr += total_absent
|
||||
else:
|
||||
working_hours = total_permission + total_mission_by_hour + hours + attendance.carried_hours
|
||||
absence_hours = attendance.plan_hours - working_hours
|
||||
|
|
|
|||
|
|
@ -86,13 +86,13 @@ class HrReasonsLateness(models.Model):
|
|||
|
||||
def action_open_related_attendance_transaction(self):
|
||||
hr_attendance_transaction = self.env['hr.attendance.transaction'].search(
|
||||
[('employee_id', '=', self.employee_id.id), ('date', '=', self.latest_date),('sequence','=',1)],limit=1).ids
|
||||
[('employee_id', '=', self.employee_id.id), ('date', '=', self.latest_date),('sequence','=',1)],limit=1)
|
||||
action = {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': _('Attendance Transaction'),
|
||||
'res_model': 'hr.attendance.transaction',
|
||||
'view_mode': 'form',
|
||||
'domain': [('id', 'in', hr_attendance_transaction)],
|
||||
'domain': [('id', '=', hr_attendance_transaction.id)],
|
||||
'target': 'current',
|
||||
}
|
||||
return action
|
||||
|
|
|
|||
Loading…
Reference in New Issue