From c5d72cd9345a68868bfa9eefbf7362868d98cb04 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 18:36:58 +0530 Subject: [PATCH] fix: Select both account number and company in the account form (backport #41731) (#41737) fix: Select both account number and company in the account form (#41731) * fix: Both the account number and the company should be selected in the account form * fix: select both account number and company in the account form (cherry picked from commit 5a75c847fefaa28041a0e7bd60efd3fe2299e76d) Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com> --- erpnext/accounts/doctype/account/account.js | 3 +-- erpnext/accounts/doctype/account/account.json | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js index 411b90f84ee..ff44723afee 100644 --- a/erpnext/accounts/doctype/account/account.js +++ b/erpnext/accounts/doctype/account/account.js @@ -22,8 +22,7 @@ frappe.ui.form.on("Account", { // hide fields if group frm.toggle_display(["tax_rate"], cint(frm.doc.is_group) == 0); - // disable fields - frm.toggle_enable(["is_group", "company"], false); + frm.toggle_enable(["is_group", "company", "account_number"], frm.is_new()); if (cint(frm.doc.is_group) == 0) { frm.toggle_display("freeze_account", frm.doc.__onload && frm.doc.__onload.can_freeze_account); diff --git a/erpnext/accounts/doctype/account/account.json b/erpnext/accounts/doctype/account/account.json index 78f73efff11..0c9232015d9 100644 --- a/erpnext/accounts/doctype/account/account.json +++ b/erpnext/accounts/doctype/account/account.json @@ -55,8 +55,7 @@ "fieldtype": "Data", "in_list_view": 1, "in_standard_filter": 1, - "label": "Account Number", - "read_only": 1 + "label": "Account Number" }, { "default": "0", @@ -72,7 +71,6 @@ "oldfieldname": "company", "oldfieldtype": "Link", "options": "Company", - "read_only": 1, "remember_last_selected_value": 1, "reqd": 1 },