From 7f2513f7a148c419fd0ab6896556fc1806b09626 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 1 Jun 2017 18:57:34 +0530 Subject: [PATCH] [Fix] Employees working on a holiday report's date filter not working (#9108) --- .../employees_working_on_a_holiday.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.py b/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.py index 60bb02cdb3..59f56d7345 100644 --- a/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.py +++ b/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.py @@ -25,11 +25,10 @@ def get_columns(): ] def get_employees(filters): - holiday_filter = {"holiday_date": (">=", filters.from_date), - "holiday_date": ("<=", filters.to_date)} + holiday_filter = [["holiday_date", ">=", filters.from_date], ["holiday_date", "<=", filters.to_date]] if filters.holiday_list: - holiday_filter["parent"] = filters.holiday_list - + holiday_filter.append(["parent", "=", filters.holiday_list]) + holidays = frappe.get_all("Holiday", fields=["holiday_date", "description"], filters=holiday_filter)