diff --git a/hr/doctype/leave_application/leave_application.js b/hr/doctype/leave_application/leave_application.js index 2d71aac0e7..328913c3c3 100755 --- a/hr/doctype/leave_application/leave_application.js +++ b/hr/doctype/leave_application/leave_application.js @@ -23,6 +23,7 @@ cur_frm.cscript.onload = function(doc, dt, dn) { method:"get_approver_list", callback: function(r) { cur_frm.set_df_property("leave_approver", "options", r.message); + get_leave_balance(cur_frm.doc); } }); } diff --git a/website/utils.py b/website/utils.py index 00e2f151bd..9b4f7b894a 100644 --- a/website/utils.py +++ b/website/utils.py @@ -73,7 +73,7 @@ def page_name(title): def update_page_name(doc, title): """set page_name and check if it is unique""" - webnotes.conn.sql(doc, "page_name", title) + webnotes.conn.set(doc, "page_name", page_name(title)) res = webnotes.conn.sql("""\ select count(*) from `tab%s`