add punch mission in report attendances
This commit is contained in:
parent
4929f48e01
commit
5740c3321c
|
|
@ -250,7 +250,6 @@ class ReportAttendancePublic(models.AbstractModel):
|
|||
domain.append(('employee_id', 'in', rc.employee_ids.ids))
|
||||
|
||||
att = self.env['hr.attendance.transaction'].search(domain)
|
||||
print("1111111111111")
|
||||
for emp in att.mapped('employee_id'):
|
||||
# lines = att.filtered(lambda l, e=emp: l.employee_id == e)
|
||||
|
||||
|
|
@ -308,10 +307,6 @@ class ReportAttendancePublic(models.AbstractModel):
|
|||
'early_exit_approved': hhmm(sum(row['early_exit_approved_int'] for row in summary_rows)),
|
||||
})
|
||||
|
||||
print("222222222")
|
||||
print(summary_totals)
|
||||
print(data['model'])
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -352,7 +347,6 @@ class ReportAttendancegeneral(models.AbstractModel):
|
|||
key_list = []
|
||||
total_dic = {}
|
||||
mykey = []
|
||||
print("gg122e")
|
||||
resource = self.env['resource.calendar'].browse(resource_calender_id)
|
||||
if resource and not employee_ids:
|
||||
if resource.employee_ids:
|
||||
|
|
@ -444,7 +438,6 @@ class ReportAttendancegeneral(models.AbstractModel):
|
|||
lambda r: r.employee_id.name == emp and (r.normal_leave or r.approve_personal_permission))
|
||||
total_not_sig_out = len(list_not_log_out)
|
||||
total_leave = len(list_leave)
|
||||
print('total_missing_punch',total_missing_punch)
|
||||
total_dic[emp] = {'total_lateness': total_lateness, 'total_early_exit': total_early_exit,
|
||||
"total_extra_hours": total_extra_hours, "total_late_early": total_late_early,
|
||||
"total_leave": total_leave, 'total_absent': total_absent,
|
||||
|
|
@ -510,7 +503,6 @@ class ReportAttendancegeneral(models.AbstractModel):
|
|||
domain.append(('employee_id', 'in', rc.employee_ids.ids))
|
||||
|
||||
att = self.env['hr.attendance.transaction'].search(domain)
|
||||
print("1111111111111")
|
||||
for emp in att.mapped('employee_id'):
|
||||
# lines = att.filtered(lambda l, e=emp: l.employee_id == e)
|
||||
|
||||
|
|
@ -571,13 +563,6 @@ class ReportAttendancegeneral(models.AbstractModel):
|
|||
'early_exit_approved': hhmm(sum(row['early_exit_approved_int'] for row in summary_rows)),
|
||||
})
|
||||
|
||||
print("222222222")
|
||||
print(summary_totals)
|
||||
print(data['model'])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
'doc_ids': data['ids'],
|
||||
|
|
@ -695,7 +680,6 @@ class AttendancesReportXls(models.AbstractModel):
|
|||
# return
|
||||
|
||||
if totals_only:
|
||||
print("حةبنرىي لايتلﻻنتبلﻻ ")
|
||||
|
||||
sheet.merge_range('F2:P2', _('تقرير الحضور والانصراف للموظفين'), fmt)
|
||||
sheet.write('G3', _('من تاريخ'), fmt)
|
||||
|
|
@ -705,7 +689,7 @@ class AttendancesReportXls(models.AbstractModel):
|
|||
|
||||
headers = [
|
||||
'الرقم الوظيفي', 'اسم الموظف', 'الدوام', 'رقم الهوية', 'اﻹدارة', 'المسمي الوظيفي',
|
||||
'ايام الحضور', 'الاجازات', 'الاجازات الرسمية', 'الغياب', 'نسيان البصمة', # إضافة العمود الجديد
|
||||
'ايام الحضور', 'الاجازات', 'الاجازات الرسمية', 'الغياب', 'نسيان البصمة',
|
||||
'ساعات العمل الفعلية', 'ساعات العمل الاضافية', 'الاستئذان', 'مهام عمل/انتداب/تدريب',
|
||||
'التأخيرات', 'الخروج المبكر',
|
||||
]
|
||||
|
|
@ -747,8 +731,7 @@ class AttendancesReportXls(models.AbstractModel):
|
|||
total_leave += len(vacation)
|
||||
total_holidays += len(holidays)
|
||||
total_absent += len(absent)
|
||||
total_missing_punch += len(missing_punch) # إضافة للمجموع
|
||||
|
||||
total_missing_punch += len(missing_punch)
|
||||
iq = getattr(emp, 'iqama_number', False) or getattr(emp, 'saudi_number', '')
|
||||
calendar_name = lines[0].calendar_id.name if lines and lines[0].calendar_id else ''
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue