From 080843850832992e445aa7d7899a7a4c2be8ad7e Mon Sep 17 00:00:00 2001 From: Saqib Date: Thu, 2 Dec 2021 15:00:42 +0530 Subject: [PATCH] fix: remove change_abbr method (#28691) --- erpnext/setup/doctype/company/company.js | 37 ---------------------- erpnext/setup/doctype/company/company.json | 9 +----- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index 8f83d3cd73a..95ca3867ee7 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -204,43 +204,6 @@ erpnext.company.set_chart_of_accounts_options = function(doc) { } } -cur_frm.cscript.change_abbr = function() { - var dialog = new frappe.ui.Dialog({ - title: "Replace Abbr", - fields: [ - {"fieldtype": "Data", "label": "New Abbreviation", "fieldname": "new_abbr", - "reqd": 1 }, - {"fieldtype": "Button", "label": "Update", "fieldname": "update"}, - ] - }); - - dialog.fields_dict.update.$input.click(function() { - var args = dialog.get_values(); - if(!args) return; - frappe.show_alert(__("Update in progress. It might take a while.")); - return frappe.call({ - method: "erpnext.setup.doctype.company.company.enqueue_replace_abbr", - args: { - "company": cur_frm.doc.name, - "old": cur_frm.doc.abbr, - "new": args.new_abbr - }, - callback: function(r) { - if(r.exc) { - frappe.msgprint(__("There were errors.")); - return; - } else { - cur_frm.set_value("abbr", args.new_abbr); - } - dialog.hide(); - cur_frm.refresh(); - }, - btn: this - }) - }); - dialog.show(); -} - erpnext.company.setup_queries = function(frm) { $.each([ ["default_bank_account", {"account_type": "Bank"}], diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index 98e46d42b0c..dae64e4ad65 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -12,7 +12,6 @@ "details", "company_name", "abbr", - "change_abbr", "is_group", "cb0", "domain", @@ -128,12 +127,6 @@ "reqd": 1, "set_only_once": 1 }, - { - "depends_on": "eval:!doc.__islocal && in_list(frappe.user_roles, \"System Manager\")", - "fieldname": "change_abbr", - "fieldtype": "Button", - "label": "Change Abbreviation" - }, { "bold": 1, "default": "0", @@ -749,7 +742,7 @@ "image_field": "company_logo", "is_tree": 1, "links": [], - "modified": "2021-05-12 16:51:08.187233", + "modified": "2021-12-02 14:52:08.187233", "modified_by": "Administrator", "module": "Setup", "name": "Company",