diff --git a/erpnext/hr/doctype/department/department.js b/erpnext/hr/doctype/department/department.js index 963f3615cc5..7db8cfbd601 100644 --- a/erpnext/hr/doctype/department/department.js +++ b/erpnext/hr/doctype/department/department.js @@ -2,6 +2,11 @@ // For license information, please see license.txt frappe.ui.form.on('Department', { + onload: function(frm) { + frm.set_query("parent_department", function(){ + return {"filters": [["Department", "is_group", "=", 1]]}; + }); + }, refresh: function(frm) { // read-only for root department if(!frm.doc.parent_department && !frm.is_new()) {