Replies: 1 comment
|
Provide code snippet: # custom_app/custom_doctype/leave_adjustment/leave_adjustment.py
import frappe
class LeaveAdjustment(frappe.Document):
def on_submit(self):
self.update_leave_application()
self.update_leave_encashment()
def update_leave_application(self):
if self.leave_application:
la = frappe.get_doc("Leave Application", self.leave_application)
la.leave_balance = self.new_balance # or appropriate field
la.db_set("leave_balance", la.leave_balance)
la.notify_update()
def update_leave_encashment(self):
if self. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have created a doctype in Frappe Hr V15, exactly like V16. So, V16 works with the leave ledger. It deducts the leave or allocates it. In Ledger, it is OK. It's working. The issue is that it doesn't update in Leave Application/Leave Encashment. How can I fix this?
All reactions