From 3776c6073059c6c146b1ce12049050a66bc6feb7 Mon Sep 17 00:00:00 2001 From: Aysha <74527579+AyshaHakeem@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:24:33 +0530 Subject: [PATCH] fix: prompt user to select company for shift & attendance report creation (#2461) Co-authored-by: Rucha Mahabal --- .../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..fb028ed283 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: