Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/hr/doctype/expense_claim/expense_claim.js b/hr/doctype/expense_claim/expense_claim.js
index 761da88..474ad13 100644
--- a/hr/doctype/expense_claim/expense_claim.js
+++ b/hr/doctype/expense_claim/expense_claim.js
@@ -53,17 +53,13 @@
 		cur_frm.set_intro("Fill the form and save it")
 	} else {
 		if(doc.approval_status=="Draft") {		
-			if(in_list(user_roles, "HR User")) {
-				if(doc.approval_status=="Draft") {
-					cur_frm.set_intro("Please Approve (and Submit) or Reject, or re-assign to applicant for further review.");				
-				}
-			} else if(user==doc.exp_approver) {
+			if(user==doc.exp_approver) {
 				if(doc.approval_status=="Draft") {
 					cur_frm.set_intro("You are the Expense Approver for this record. Please Update the 'Status' and Save");
 					cur_frm.set_df_property("approval_status", "permlevel", 0);
 				}
 			} else {
-				cur_frm.set_intro("Expense Claim is pending approval.");
+				cur_frm.set_intro("Expense Claim is pending approval. Only the Expense Approver can update status.");
 			}
 		} else {
 			if(doc.approval_status=="Approved") {
@@ -109,7 +105,7 @@
 }
 
 cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
-	if(cint(wn.boot.notification_settings.expense_claim)) {
+	if(cint(wn.boot.notification_settings && wn.boot.notification_settings.expense_claim)) {
 		cur_frm.email_doc(wn.boot.notification_settings.expense_claim_message);
 	}
 }
\ No newline at end of file
diff --git a/hr/doctype/leave_application/leave_application.js b/hr/doctype/leave_application/leave_application.js
index 64c1e24..d550734 100755
--- a/hr/doctype/leave_application/leave_application.js
+++ b/hr/doctype/leave_application/leave_application.js
@@ -31,13 +31,11 @@
 		cur_frm.set_intro("Fill the form and save it")
 	} else {
 		if(doc.status=="Open") {
-			if(in_list(user_roles, "HR User")) {
-				cur_frm.set_intro("Please Approve (and Submit) or Reject, or re-assign to applicant for further review.");				
-			} else if(user==doc.leave_approver) {
+			if(user==doc.leave_approver) {
 				cur_frm.set_intro("You are the Leave Approver for this record. Please Update the 'Status' and Save");
 				cur_frm.set_df_property("status", "permlevel", 2);
 			} else {
-				cur_frm.set_intro("This Leave Application is pending approval.")
+				cur_frm.set_intro("This Leave Application is pending approval. Only the Leave Apporver can update status.")
 			}
 		} else {
  			if(doc.status=="Approved") {
diff --git a/patches/december_2012/expense_leave_reload.py b/patches/december_2012/expense_leave_reload.py
index a3c621f..06c67e6 100644
--- a/patches/december_2012/expense_leave_reload.py
+++ b/patches/december_2012/expense_leave_reload.py
@@ -2,7 +2,7 @@
 
 def execute():
 	# new roles
-	roles = [r[0] for r in webnotes.conn.sql("""select name from tabRole""")]:
+	roles = [r[0] for r in webnotes.conn.sql("""select name from tabRole""")]
 	if not "Leave Approver" in roles:
 		webnotes.model_wrapper([{"doctype":"Role", "role_name":"Leave Approver", 
 			"__islocal":1, "module":"HR"}]).save()