mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 05:59:18 +00:00
fix: remove change_abbr method (#28691)
This commit is contained in:
@@ -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) {
|
erpnext.company.setup_queries = function(frm) {
|
||||||
$.each([
|
$.each([
|
||||||
["default_bank_account", {"account_type": "Bank"}],
|
["default_bank_account", {"account_type": "Bank"}],
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
"details",
|
"details",
|
||||||
"company_name",
|
"company_name",
|
||||||
"abbr",
|
"abbr",
|
||||||
"change_abbr",
|
|
||||||
"is_group",
|
"is_group",
|
||||||
"cb0",
|
"cb0",
|
||||||
"domain",
|
"domain",
|
||||||
@@ -128,12 +127,6 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"set_only_once": 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,
|
"bold": 1,
|
||||||
"default": "0",
|
"default": "0",
|
||||||
@@ -749,7 +742,7 @@
|
|||||||
"image_field": "company_logo",
|
"image_field": "company_logo",
|
||||||
"is_tree": 1,
|
"is_tree": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-12 16:51:08.187233",
|
"modified": "2021-12-02 14:52:08.187233",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Setup",
|
"module": "Setup",
|
||||||
"name": "Company",
|
"name": "Company",
|
||||||
|
|||||||
Reference in New Issue
Block a user