[Fix] Permission issue while saving leave application

This commit is contained in:
Rohit Waghchaure 2018-05-21 15:39:38 +05:30
parent 1275ea5123
commit 11e2a9ac90

View File

@ -126,6 +126,7 @@ class LeaveApplication(Document):
doc.company = self.company
doc.status = "On Leave"
doc.leave_type = self.leave_type
doc.insert(ignore_permissions=True)
doc.submit()
else:
doc = frappe.new_doc("Attendance")
@ -134,6 +135,7 @@ class LeaveApplication(Document):
doc.company = self.company
doc.status = "Half Day"
doc.leave_type = self.leave_type
doc.insert(ignore_permissions=True)
doc.submit()
def validate_salary_processed_days(self):