diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js index 091cc82f171..874e239b9a7 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -139,6 +139,11 @@ frappe.treeview_settings["Account"] = { description: __( "Further accounts can be made under Groups, but entries can be made against non-Groups" ), + onchange: function () { + if (!this.value) { + this.layout.set_value("root_type", ""); + } + }, }, { fieldtype: "Select",