From 354b32177dd17ee7dfac0f126dda86e4be33fa2e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 14 Apr 2014 22:23:41 +0530 Subject: [PATCH] fix for leave application test --- erpnext/hr/doctype/leave_allocation/leave_allocation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.py b/erpnext/hr/doctype/leave_allocation/leave_allocation.py index cbb64263cf..912f8f043f 100755 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.py +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.py @@ -12,6 +12,8 @@ class LeaveAllocation(Document): def validate(self): self.validate_new_leaves_allocated_value() self.check_existing_leave_allocation() + if not self.total_leaves_allocated: + self.total_leaves_allocated = self.new_leaves_allocated def on_update_after_submit(self): self.validate_new_leaves_allocated_value()