fix(patch): Reload Leave Type (#19240)

This commit is contained in:
sahil28297 2019-10-04 16:24:53 +05:30 committed by Nabin Hait
parent d5067b4d73
commit 2caf32d421

View File

@ -10,6 +10,7 @@ def execute():
for last allocation """
frappe.reload_doc("HR", "doctype", "Leave Ledger Entry")
frappe.reload_doc("HR", "doctype", "Leave Encashment")
frappe.reload_doc("HR", "doctype", "Leave Type")
if frappe.db.a_row_exists("Leave Ledger Entry"):
return
@ -84,4 +85,4 @@ def get_leaves_application_records():
def get_leave_encashment_records():
return frappe.get_all("Leave Encashment", filters={
"docstatus": 1
}, fields=['name', 'employee', 'leave_type', 'encashable_days', 'encashment_date'])
}, fields=['name', 'employee', 'leave_type', 'encashable_days', 'encashment_date'])