raise leave blocked error when status is saved as Approved

This commit is contained in:
Anand Doshi 2013-02-19 18:37:51 +05:30
parent c25cf3f413
commit d70f7dec2b

View File

@ -71,7 +71,7 @@ class DocType(DocListController):
for d in block_dates: for d in block_dates:
webnotes.msgprint(formatdate(d.block_date) + ": " + d.reason) webnotes.msgprint(formatdate(d.block_date) + ": " + d.reason)
if self.doc.docstatus == 1: if self.doc.status == "Approved":
raise LeaveDayBlockedError raise LeaveDayBlockedError
def get_holidays(self): def get_holidays(self):