Merge pull request #17195 from asbasawaraj/fixed_account_ranme_when_company_abbr_is_updated

Fixed Company Abbr Update Was Not Able To Update Account
This commit is contained in:
Nabin Hait 2019-04-16 12:51:13 +05:30 committed by GitHub
commit 00e9659e3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -372,7 +372,7 @@ def replace_abbr(company, old, new):
def _rename_record(doc):
parts = doc[0].rsplit(" - ", 1)
if len(parts) == 1 or parts[1].lower() == old.lower():
frappe.rename_doc(dt, doc[0], parts[0] + " - " + new)
frappe.rename_doc(dt, doc[0], parts[0] + " - " + new, force=True)
def _rename_records(dt):
# rename is expensive so let's be economical with memory usage