Renaming company abbreviation is broken: How to fix Cost Center names?

We are running ERPnext in a multicompany setup. As we open new daughter companies, we realized that we need to rename the abbreviations of old companies.

ERPnext has the (IMHO unpleasant) characteristic to automatically append the company abbreviation to several other doctype names such as CoA or Cost Centers. This abbreviation is however not editable and only appended automatically by the system.

Changing the company abbreviation propagates correctly and adjusts the name in the Chart of Accounts, but the abbreviations in the Cost Centers remain the old ones. Manually renaming the Cost Centers also doesn’t work for me.

Did anyone experience a similar issue or can you also reproduce it? How can I fix it? The old companies are renamed but the Cost Centers can’t be renamed to match the new abbreviations.

(Github issue is raised here: Changes to Company abbreviation don't propagate properly to Cost Centers, Tax templates, Warehouses etc. · Issue #26746 · frappe/erpnext · GitHub)

See if setting the parent cost center first and then child allows you to do fix it.

Thanks for the advice. Unfortunately, that’s not the solution. Renaming the Cost Center won’t change the abbreviation. The abbreviation appended to the name of the Cost Center is set automatically by ERPnext and can not be changed manually.
A fix I found was to delete the old Cost Center and create new ones. But this also doesn’t work entirely, as the Parent Cost Center (with the old abbreviation) can’t be deleted.

As mentioned in the Github issue, this problem seems to have deeper roots: Some of the warehouses and tax templates are also affected and remain with the old abbreviation.

I am currently on the latest version (13.7). There were recently two changes to the renaming
in 13.7 (fix: move the rename abbreviation job to long queue (#26434) by nextchamp-saqib · Pull Request #26462 · frappe/erpnext · GitHub) and in 13.6 (fix: too many writes while renaming company abbreviation by nextchamp-saqib · Pull Request #26203 · frappe/erpnext · GitHub). If I understand it correctly, with the recent PRs renaming can be just aborted because “If a company has 20k+ warehouses or accounts, then replacing the abbreviation is never completed and throws error while being executed in a background job” (see fix: too many writes while renaming company abbreviation by nextchamp-saqib · Pull Request #26142 · frappe/erpnext · GitHub).
It seems to be an unclean solution to the problem that the fix is just to stop renaming (not sure if this is really what is done - just my brief understanding of the PRs).

@nextchamp.saqib I think you created the PRs. Is it possible that these PRs are the root of the issue? How can we circumvent the problem of a potentially very long list of entries (warehouse, CC etc) that need to be renamed while still making sure that all entries are renamed properly?

I still can’t figure out the use of abbreviation. Why it is there and how it is used by ERPNext? Anyone with deeper knowledge here?

I don’t really have deeper knowledge why it was added in the first place. It seems to me a historic relic that no one has bothered to change yet (as it’s mostly cosmetic). I think in a multi-company setup it can be useful to differentiate between different entries if they otherwise had the same name. However in my opinion, one should be free to adjust the entire name and just add it the way it is wished/must appropriate (with our without abbreviation, in front/back of the name, different separator etc.) would be also interested to learn more about its background.

Still broken in 2024. You cannot change a company since “Abbr.” is required but not displayed.

Hi @helgator:

Actually, company name can be changed …

Click over the name on Company doctype …

Abbr cannot be changed, since this field has set_only_once property " It is used on many other doctypes (cost center, warehouse, etc …). But there you can manually change names same way …

Have you raised an issue as feature request?