From a6b6c77fcc8ea329c33e851a7d9f80794da5cf23 Mon Sep 17 00:00:00 2001 From: Aysha Date: Thu, 28 Nov 2024 02:32:23 +0530 Subject: [PATCH] fix: prompt user to select company for report shift & attendance report creation --- .../monthly_attendance_sheet/monthly_attendance_sheet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py index 9823a30ab9..d681d21cad 100644 --- a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py +++ b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py @@ -32,6 +32,9 @@ def execute(filters: Filters | None = None) -> tuple: if not (filters.month and filters.year): frappe.throw(_("Please select month and year.")) + if not (filters.company): + frappe.throw(_("Please select company.")) + if filters.company: filters.companies = [filters.company] if filters.include_company_descendants: