diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 45d5ce0c1c..6dee2ad92a 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -423,11 +423,11 @@ def replace_abbr(company, old, new): _rename_record(d) try: frappe.db.auto_commit_on_many_writes = 1 - frappe.db.set_value("Company", company, "abbr", 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() + frappe.db.set_value("Company", company, "abbr", new) except Exception: frappe.log_error(title=_('Abbreviation Rename Error'))