replace cur_frm with frm
diff --git a/erpnext/hr/doctype/department/department.js b/erpnext/hr/doctype/department/department.js
index de93390..76bc932 100644
--- a/erpnext/hr/doctype/department/department.js
+++ b/erpnext/hr/doctype/department/department.js
@@ -5,8 +5,8 @@
refresh: function(frm) {
// read-only for root department
if(!frm.doc.parent_department) {
- cur_frm.set_read_only();
- cur_frm.set_intro(__("This is a root department and cannot be edited."));
+ frm.set_read_only();
+ frm.set_intro(__("This is a root department and cannot be edited."));
}
},
validate: function(frm) {