From 2dea40f7bef0693d900b7d7b8e72d8d9d567c471 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 15 Apr 2015 15:02:29 +0530 Subject: [PATCH] [leave-allocation] can cancel and re-submit or make a new one, fixes frappe/erpnext#3042 --- erpnext/hr/doctype/leave_allocation/leave_allocation.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.py b/erpnext/hr/doctype/leave_allocation/leave_allocation.py index ab1723019e..272ec3996b 100755 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.py +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.py @@ -89,12 +89,3 @@ class LeaveAllocation(Document): frappe.db.set(self,'carry_forwarded_leaves',flt(leave_det['carry_forwarded_leaves'])) frappe.db.set(self,'total_leaves_allocated',flt(leave_det['total_leaves_allocated'])) - def check_for_leave_application(self): - exists = frappe.db.sql("""select name from `tabLeave Application` - where employee=%s and leave_type=%s and fiscal_year=%s and docstatus=1""", - (self.employee, self.leave_type, self.fiscal_year)) - if exists: - frappe.msgprint(_("Cannot cancel because Employee {0} is already approved for {1}").format(self.employee, - self.leave_type)) - frappe.throw('{0}'.format(exists[0][0])) -