fix: remove change_abbr method (#28691)

This commit is contained in:
Saqib
2021-12-02 15:00:42 +05:30
committed by GitHub
parent 0325ed1277
commit 0808438508
2 changed files with 1 additions and 45 deletions

View File

@@ -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"}],

View File

@@ -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",