From 2f8893439f1e11b987cdfd648db84662a56fb558 Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Thu, 19 Jun 2025 17:47:28 +0530 Subject: [PATCH] fix: coa reset root_type on unchecking is_group on new_node (#48156) --- erpnext/accounts/doctype/account/account_tree.js | 5 +++++ 1 file changed, 5 insertions(+) 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",