From a57d58f7565ff127ad6e6951acf6698e498f456f Mon Sep 17 00:00:00 2001 From: Zlash65 Date: Mon, 28 Jan 2019 16:39:14 +0530 Subject: [PATCH] feat: once company is saved, parent_company cannot be selected --- erpnext/setup/doctype/company/company.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index dbfbc5932e..5592e9bd64 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -53,8 +53,9 @@ frappe.ui.form.on("Company", { }, refresh: function(frm) { - if(frm.doc.abbr && !frm.doc.__islocal) { + if(!frm.doc.__islocal) { frm.set_df_property("abbr", "read_only", 1); + frm.set_df_property("parent_company", "read_only", 1); } frm.toggle_display('address_html', !frm.doc.__islocal);