How to apply/use a CoA from https://charts.erpnext.com?

I wan to set up a new ERPNext instance and use the Chart of accounts fro Spain from https://charts.erpnext.com/chart?company=Spain%20-%20PGCE%20común&forked=0&submitted=0

I tried to setup a new company and and to choose “Spain” as my country … that didn’t give me the spanish CoA but I’m again matched up with the default CoA.

So, how do I do it? I’d also like to add this to the manual

Please refer to the following thread, you may find it useful

If I understand it correctly all the CoA present will only be usable after they actually will be merged into ERPNext. And there is no way to utilize the unmerged ones to or apply them in any way (by importing i.e).

  • is that understanding correct?
  • If so, when do you think they will be merged (and likewise available?)

for now it (if my understanding above is correct) it looks as if there has been done a low of work at charts.erpnext.com which has no usage value whatsoever yet.

(I have an instance with a company located in Spain. And can not manage to Apply the Spanish Chart of accounts)

I think your understanding is correct, the CoA contributed needs to be merged.

How often it is merged etc, is a question someone from core frappe team can answer.

haha, I thought you were one of them

  • do you happen to know where exactly in the code those Charts are? just curious to take a look
  • those are .json files, right?
  • Can we push that merging in any way (by preparing a PR i.e.)?

You can look at this path, you will find the verified & unverified one’s.

JSON can be contributed via GitHub

thanks, found them erpnext/erpnext/accounts/doctype/account/chart_of_accounts at master · frappe/erpnext · GitHub

is it that only the chart is int verified folder are accessible? then the question would be wither

  • how to get a CoA regarded as ‘verified’? or
  • wouldn’t an unverified CoA for any country be better then none whatsoever (or the default template which isn’t verified for any country)?
  • is the .json file used constantly by ERPNExt or only once when the CoA is created?

digged into it a bit deeper. Seems like (at least the one Chart I was looking at for my current usecase ) is sorted as ‘unverified’ but actually is just ‘unfinished’ and therefore simply not working.

  • copied the CoA I wanted to try from the ‘unverified’ to the ‘verified’ folder.
  • created a new company (country: Spain)
  • now the CoA fro spain from the template appeared but through an error message (due to the file missing some entries for root account type

@Pawan
How I can select certain chart of account from the verified (or even the not verified)?
For the time being, I selected the country to be Lebanon (from the system settings) but it does not give me the chart of account that I need, I need to use certain one of those verified (or even not verified), how?

In other words: How I can determine the active (the used) chart of account?
Based on what the current chart of account is selected? From where I can change it?

Regards
Bilal

Verified CoA are picked up based on country selected during initial setup of the system and not by changing Country on settings.

You can refer to the following link too for more information.

if you take a ‘non-verified’ one and copy it to the ‘verified’ folder (to be found somewhere in /home/frappe/frappe-bench/apps/erpnext/...) it should turn up. I tried this once (Spain was my example) but it seems that there is code missing, so it would not work. So I guess ‘non-verified’ means ‘not ready’ as well.

Also if you do that you will get problems on updating I suppose (because you apply changes in the local erpnext git repository). I guess those can be dealt with but you’d need to know what you are doing git-wise.

And the selection will be country based?
Because what I see in the company setup, it is only showing the option “Standard” and not having any other CoA options.

Regards
Bilal

yes, I think it’s country based. You can cheat the system by naming the file you want to use accordingly (that’s how it get’s picked I think)

btw /home/frappe/frappe-bench/apps/erpnext/accounts/doctype/account/chart_of_accounts/ is the exact location

DISCLAIMER: plaid a bit with this once. So ideally you’d double confirm what I say

1 Like

Wonderful. Actually I changed the country code to one of the codes that are existed in the verified folder and it works fine.
The question is: how I can build the json file from the tree that appears in the interface or from the exported excel file? Or I have to write it manually?

Regards
Bilal

that’s what https://charts.erpnext.com/ could be used for I guess. I couldn’t get it to work when I tried though

Hello

@vrms @Pawan

As I understand that https://charts.erpnext.com/ is used to let users contributed their CoA based on their countries and it will be merged with ERPnext later on (after checking).
But I did not find any tool to create json file from the CoA in https://charts.erpnext.com/
That is why I looking to know the method to create json file from the CoA so I can use it as a reference instead of creating CoA everytime.
If there is no tool to create json file from CoA, then I have to create this json file manually. Hope if someone can advise me and help me.

Regards
Bilal

IF you use https://charts.erpnext.com to create a new CoA (which may be just the one you want to have). … Shouldn’t that result into a json file being produced?

I get a "Duplicate name Company [Account name] when tryiing to fork an existing CoA though

I did not finish the CoA to know if the result will be json. But I created one and I did not see any button that let me generate json or download.

Yes, the same thing happened with me, but I created new CoA in new name (not used name). Really I do not know what is the benefit of fork if it always give us that duplicated name and can not do any modification.

Regards
Bilal

1 Like

Is the only way to use country’s chart of accounts to create a new company?

1 Like

Maybe this is a too late response. But I hope it still helps those who need :slight_smile:

  • I made a custom copy of the CoA for my company by changing the content of the file, in my case id. But only change the text of the CoA itself (starting from the root Asset downward). Don’t change the code above it, especially the name of the country.

  • There are 3 files I changed in order to give global default for anyone creating new company or new sites (I use multi tenants):
    – id_chart_of_accounts.json
    – standard_chart_of_accounts_with_account_number.py
    – standard_chart_of_accounts.py

  • If only json file is changed, a new site will have to choose the CoA. Otherwise the py file will be chosen by default.

  • But if the py files are translated, the default fields in the company is not filled in by default accounts.

  • Disclaimer: this customization will not survive ERPNext update.

I hope this can be useful for anybody. But still I need guidance if this method is overdo (except those suggesting it will change when doing updates).

Thanks