From 7c2bf026ef443ddcf58a7bf2d6c66d8fb4e9a545 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 19 Jun 2025 17:54:08 +0530 Subject: [PATCH] fix: coa reset root_type on unchecking is_group on new_node (backport #48156) (#48160) fix: coa reset root_type on unchecking is_group on new_node (#48156) (cherry picked from commit 2f8893439f1e11b987cdfd648db84662a56fb558) Co-authored-by: Diptanil Saha --- 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 a61fcb4f530..0641612c615 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -138,6 +138,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",