From 2caf32d421f4d456c089a33b43473a40bfe31717 Mon Sep 17 00:00:00 2001 From: sahil28297 <37302950+sahil28297@users.noreply.github.com> Date: Fri, 4 Oct 2019 16:24:53 +0530 Subject: [PATCH] fix(patch): Reload Leave Type (#19240) --- erpnext/patches/v12_0/generate_leave_ledger_entries.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v12_0/generate_leave_ledger_entries.py b/erpnext/patches/v12_0/generate_leave_ledger_entries.py index 5e91449c3e..c5bec19fed 100644 --- a/erpnext/patches/v12_0/generate_leave_ledger_entries.py +++ b/erpnext/patches/v12_0/generate_leave_ledger_entries.py @@ -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']) \ No newline at end of file + }, fields=['name', 'employee', 'leave_type', 'encashable_days', 'encashment_date'])