From 395f44c8b72d507df0583f113d681f685dd130b9 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 14 Jul 2020 20:46:25 +0530 Subject: [PATCH] fix: Replace company abbr --- erpnext/setup/doctype/company/company.js | 2 -- erpnext/setup/doctype/company/company.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index be736d2d9d1..14cacf37bb6 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -202,8 +202,6 @@ cur_frm.cscript.change_abbr = function() { if(r.exc) { frappe.msgprint(__("There were errors.")); return; - } else { - cur_frm.set_value("abbr", args.new_abbr); } dialog.hide(); cur_frm.refresh(); diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index bc27f40f560..335cad3598b 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -400,8 +400,6 @@ def replace_abbr(company, old, new): for dt in ["Warehouse", "Account", "Cost Center", "Department", "Sales Taxes and Charges Template", "Purchase Taxes and Charges Template"]: _rename_records(dt) - frappe.db.commit() - def get_name_with_abbr(name, company): company_abbr = frappe.get_cached_value('Company', company, "abbr")