mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
Merge pull request #22684 from nabinhait/company-abbr-replace
fix: Replace company abbr
This commit is contained in:
@@ -202,8 +202,6 @@ cur_frm.cscript.change_abbr = function() {
|
|||||||
if(r.exc) {
|
if(r.exc) {
|
||||||
frappe.msgprint(__("There were errors."));
|
frappe.msgprint(__("There were errors."));
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
cur_frm.set_value("abbr", args.new_abbr);
|
|
||||||
}
|
}
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
cur_frm.refresh();
|
cur_frm.refresh();
|
||||||
|
|||||||
@@ -400,8 +400,6 @@ def replace_abbr(company, old, new):
|
|||||||
for dt in ["Warehouse", "Account", "Cost Center", "Department",
|
for dt in ["Warehouse", "Account", "Cost Center", "Department",
|
||||||
"Sales Taxes and Charges Template", "Purchase Taxes and Charges Template"]:
|
"Sales Taxes and Charges Template", "Purchase Taxes and Charges Template"]:
|
||||||
_rename_records(dt)
|
_rename_records(dt)
|
||||||
frappe.db.commit()
|
|
||||||
|
|
||||||
|
|
||||||
def get_name_with_abbr(name, company):
|
def get_name_with_abbr(name, company):
|
||||||
company_abbr = frappe.get_cached_value('Company', company, "abbr")
|
company_abbr = frappe.get_cached_value('Company', company, "abbr")
|
||||||
|
|||||||
Reference in New Issue
Block a user