Merge pull request #5070 from vjFaLk/hotfix

Fix for Holiday List in Maintenance Schedule
This commit is contained in:
Rushabh Mehta 2016-03-29 10:17:27 +05:30
commit 2de1f86009

View File

@ -94,7 +94,11 @@ class MaintenanceSchedule(TransactionBase):
validated = False
employee = frappe.db.get_value("Sales Person", sales_person, "employee")
holiday_list = get_holiday_list_for_employee(employee)
if employee:
holiday_list = get_holiday_list_for_employee(employee)
else:
holiday_list = frappe.db.get_value("Company", self.company, "default_holiday_list")
holidays = frappe.db.sql_list('''select holiday_date from `tabHoliday` where parent=%s''', holiday_list)
if not validated and holidays: