Try ERPNext Buy Support Partners Foundation

Import chart of accounts issue


I am trying to import a complete chart of accounts using the importer, but for some reason I always get errors and cannot complete the process.

So I’m trying to insert new records, I’ve tried of course downloading the template and modifying it accordingly.

I tried importing 1 account at a time to see if it works. Nope

I’ve tried CSV and XLS files, same outcome.

I’ve tried updating existing records from an exported dataset… nope.

I’ve even tried exporting and reimporting the same data with no success.

I get errors like COLUMN 6 (Parent Account) The following values do not exist for Account: Actifs non-courants, Actif, Banque, Dépenses, Actif à court terme, Passif, Encaisse, Immobilisations

Which seems to point out that the importer can’t find the parent account, but in my import list, I am creating the parent before importing the child. And I’m checking for typos and other obvious errors.

I am using account numbers, so I checked the database and tried to rewrite the parent_account using the syntax Acc# - AccName - CieAbbr and it’s not working.

So I’m pretty sure I am missing something but I can’t find anything in the docs that I’m doing wrong or in the forums related to my issue and I’m pretty much out of ideas as to what to look for next to make this work!

Thanks for your suggestions/explanations

Are you using Chart of Accounts Importer or Data Import of Accounts DocType?

I’ve tried both

With Chart of Accounts Importer, you use the Account Name (without Number and company initials) as parent. The tricky part is you need to specify some account types of Cash, Receivables, etc.

I find using Data Import easier to do. But you cannot do it all at one because the Parent Account needs to be defined in the chart of Accounts before you upload Child Accounts.

So, it may require several Data Imports, but you eventually get there.

  1. Import the 5 root Accounts (Asset, Liability, Equity, Income, Revenue)
  2. Download the Root Accounts and copy the Name (Number - Account Name - Company Initials) and use it on Parent Column, Import Child Accounts of the Root Accounts.
  3. Repeat process until you imported all accounts
1 Like

Ok thanks, I’ll try that and report back!

Ok, when importing root accounts, what should be the value of the parent_account attribute? I’ve tried the company name but it doesn’t work.

**If I put nothing, it complains that parent_account is a mandatory field! isn’t it a catch 22?

EDIT: Ok, I just realized that the company name goes into the parent field for root accounts, but not sure if I would be able to import root accounts since parent_account is still a mandatory field… can we import root accounts or they should be manually created before import?

All right!

I creating the root accounts directly from the web interface, then the import succeeded using Data Imports and like you suggested, 1 level at a time.

As a side note, is this going to be fixed in the future, seems like importing this way is counter intuitive and time consuming… Just wondering!

In any case, I’m glad I can at least make it work for now!

Thanks for your help

I’m glad. Thanks.