fix: review changes

This commit is contained in:
Anupam
2020-09-23 18:43:12 +05:30
parent d5a33f4604
commit ecfc4b3fd4
3 changed files with 335 additions and 336 deletions

View File

@@ -85,10 +85,6 @@ frappe.ui.form.on("Leave Application", {
frm.set_value('employee', perm['Employee'].map(perm_doc => perm_doc.doc)[0]);
}
}
if (frm.doc.docstatus) {
frm.set_df_property("status", "read_only", 1);
}
},
employee: function(frm) {

View File

@@ -172,7 +172,8 @@
"in_standard_filter": 1,
"label": "Status",
"no_copy": 1,
"options": "Open\nApproved\nRejected\nCancelled"
"options": "Open\nApproved\nRejected\nCancelled",
"permlevel": 1
},
{
"fieldname": "sb10",
@@ -191,6 +192,7 @@
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"read_only": 1,
"remember_last_selected_value": 1,
"reqd": 1
},
@@ -242,9 +244,10 @@
],
"icon": "fa fa-calendar",
"idx": 1,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"max_attachments": 3,
"modified": "2019-08-13 13:32:04.860848",
"modified": "2020-09-23 18:53:11.608446",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Application",

View File

@@ -56,7 +56,7 @@ class LeaveApplication(Document):
def on_cancel(self):
self.create_leave_ledger_entry(submit=False)
self.status = "Cancelled"
self.db_set("status", "Cancelled")
# notify leave applier about cancellation
self.notify_employee()
self.cancel_attendance()