Chart of Accounts Importer not working

Chart of Accounts Importer is not working anymore for me since the new template was implemented. Anyone who could upload it successfully? Could you share your template with an example row with me? Pls see an example row of my template:


Go to Data Importer, Select Account and save.
You can download the template from the screen that follows.

1 Like

Thanks a lot Joseph!

Data Import template is different from the Chart of Accounts Importer. The Parent Account in Data Import is has the account name and company name also. Also, COA Importer replaces completely the accounts, which is what I need to do when setting up the new company. What I noticed in the new COA Importer is the additional Parent Account column. The error message is missing Parent Account but my upload file clearly has the Parent Account record.

Yes. Chart of Accounts Importer is quite difficult when you have Account Number. About two years ago, I had revised the Chart of Accounts Importer so that the Parent Account Number is used instead of Parent Account. I submitted the code in github, but I think it was not accepted. For now, Data Import Template serves my purpose well enough, although it is quite involved and requires several uploads. But you get there. (Especially because I use google sheets to speed things up.)

An alternate approach – use the REST API:

Upload the file to ERPNext:

curl --silent --location --request POST '' \
--header 'Authorization: token {{Key}}:{{Secret}}' \
--header 'Accept: application/json' \
--form 'file=@"/home/lopez/erpnext/cosas/planDeCuentas.csv"' \
--form 'is_private="1"'

Run the chart of accounts installer:

curl --silent --location --request POST '' \
--header 'Authorization: token {{Key}}:{{Secret}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "file_name": "/private/files/planDeCuentas.csv",
    "company": "Hogar Para Todos"