Merge pull request #14162 from rohitwaghchaure/permissions_issue_leave_application

[Fix] Permission issue while saving leave application
This commit is contained in:
rohitwaghchaure 2018-05-21 16:02:58 +05:30 committed by GitHub
commit 37da7d7d05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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