From a2e4cb0235cd804b5c16fbc22d01ec35ec99d94e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 6 Dec 2012 17:09:38 +0530 Subject: [PATCH] item, leave_balance: hotfix --- hr/doctype/leave_application/leave_application.js | 1 + website/utils.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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`