land ,port

This commit is contained in:
blackbelts 2025-05-29 09:59:56 +03:00
parent 6fa8c12645
commit a429abd969
1 changed files with 8 additions and 9 deletions

View File

@ -63,16 +63,15 @@ class AttendancesReport(models.TransientModel):
if not self.employee_ids:
raise ValidationError(_("Please select Employees Name"))
if self.print_totals_only:
report_ref = (
"attendances.action_totals_only_attendance_report"
)
else:
report_ref = (
"attendances.action_general_attendance_report"
)
if self.print_totals_only == True:
return self.env.ref(report_ref).report_action(self, data=self._payload())
return self.env.ref("attendances.action_totals_only_attendance_report").report_action(self, data=self._payload())
else:
return self.env.ref("attendances.action_general_attendance_report").report_action(self, data=self._payload())
# return self.env.ref(report_ref).report_action(self, data=self._payload())
def print_excel_report(self):
return self.env.ref("attendances.general_attendance_action_xls").report_action(self, data=self._payload(), config=False)