How to import accounts, customers and suppliers
What is it for?
It loads the chart of accounts, customers and suppliers that come from your previous software, instead of typing them one by one. The product ships file templates with the right columns and rejects what is wrong, for example a tax number (NIF) with the wrong check digit or an account with a code that already exists.
This article covers only the records. The amounts (balances and unpaid invoices) come next, in the opening balances and the open documents, which need the accounts and partners to exist first.
When to use it?
- When migrating from another program: accounts, customers and suppliers are the first import, before any balance.
- When the company has many records to create at once.
- Do not use it to update records that already exist: a customer or supplier with the NIF or reference of an existing record is rejected at Test (see “Common problems”).
Where to find it?
In each list, click the gear icon next to the title and choose Import:
- Accounts: Accounting › Configure › General › Chart of accounts.
- Customers: Accounting › Record › Partners and assets › Customers.
- Suppliers: Accounting › Record › Partners and assets › Suppliers.
The Import screen of the Record menu does not have these three imports: it holds journal entries, bank statements, assets and opening balances.
Before you start
-
Your profile is Fiscal officer or Administrator: these are the ones that carry the “Fiscal Migration / Import” permission in the demo. With the Accountant profile, Test and Import are refused (see “Common problems”); the Accountant does not even see Chart of accounts in the menu.
-
Choose the right company in the top-right corner: accounts are created in the active company. Customers and suppliers are available to all companies.
-
The file is CSV or XLSX, with a header in the first row. Download the template from the import page itself (step 2) and do not change the column titles: the screen uses them to know which field each column goes to.
-
Example of accounts, with made-up data:
code name account_type reconcile l10n_pt_taxonomy_code 211190Clientes - loja online asset_receivableTrue10622190Consultoria externa expenseFalse357 -
Example of customers, with made-up NIFs that have the correct check digit:
name vat street zip city country_id email phone property_payment_term_id/id ref Cliente Delta, Lda 503000779Rua do Exemplo 10 4000-001 Porto Portugal geral@delta.invalid220000001 account.account_payment_term_30daysCL001 Cliente Épsilon, Lda 504000888Avenida Fictícia 25 1000-100 Lisboa Portugal geral@epsilon.invalid210000002 account.account_payment_term_30daysCL002 The supplier template is the same, without the payment terms column.
How to use it
- Open the list (for example Chart of accounts), click the gear icon next to the title and choose Import.
- On the import page, before choosing the file, download the template. Use the one called Template for SNC accounts with SAF-T taxonomy (CSV or XLSX), or, for customers and suppliers, the partner template with Portuguese tax data. The first one (Template for the chart of accounts) is the generic Odoo template, without the taxonomy column. Delete the example row (“APAGAR ESTA LINHA”) and fill in one row per account or per partner.
- Choose the file with Upload File (or drag it onto the page) and check on the right that each column is linked to the right field (for example
codeto Code andaccount_typeto Type). If the file has accented characters, check the Encoding (utf-8in the template) and, if the CSV uses semicolons, change the Separator. - Click Test. If there are problems, the screen says what is wrong and nothing is saved. For accounts, the red warning at the top shows the row (“Error at row 3”) and the column with the unknown value shows the value and See possible values. Correct the file, click Load File and choose it again.
- With no errors, Test says “Everything seems valid.” Click Import.
- The Imported records list shows what was created, with the notification “2 records successfully imported”. For accounts, the Class (2 - Receivables and payables; 6 - Expenses) and the Nature (Debit) are filled in from the code and the type.
- Repeat for Customers and Suppliers, each in its own list. In a customer file with a wrong NIF, Test rejects only that row:
Expected result
- Accounts: the two accounts created in the active company, with the class and nature derived from the code and type, and the SAF-T taxonomy from the column. Account
211190is reconcilable and622190is not. - Customers and suppliers: the records created with a validated NIF, address, email and phone. The phone is normalised:
220000001becomes+351 22 000 0001. Customers get the customer rank and suppliers the supplier rank, and they appear in the Customers and Suppliers lists. - No amounts: there are no balances and no journal entries. The import adds nothing to the trial balance.
Important notes
- A new account is not used by anything on its own. The imported customers got the default receivable account (
2111Clientes gerais), not the211190from the file. If you want customers in their own account, choose it on each customer's form. - SAF-T taxonomy. The
l10n_pt_taxonomy_codecolumn links the account to the accounting SAF-T code (see taxonomies). The codes in the example (10 and 357) are those of the equivalent accounts in the demo chart. Pending validation by a certified accountant: choice of taxonomy for new accounts outside the base chart. - Values as text. The account type accepts the technical name (
expense) and the name you see on screen (“Expenses”); reconciliation acceptsTrue/Falseand “Yes”/“No”. - Row numbering. “Error at row N” counts from the first data row: N = 1 is the first account or partner, not counting the header.
- Limits. Split very large files into parts. Test rejects accounts with a code that already exists and customers or suppliers with the NIF or reference of an existing record.
- NIF. The NIF is validated by its check digit, without confirming that it exists at the AT.
Common problems
“You are not allowed to load fiscal records from a file”
- Symptom: at Test and Import, the banner “You are not allowed to load fiscal records from a file: the permission “Fiscal Migration / Import, or system administrator” is required, which your user does not have.”
- Cause: the profile does not have the migration permission.
- What to do: ask the Fiscal officer or an administrator to import for you, or to give you the permission. See also I do not have permission.
“The NIF “…” is not valid”
- Symptom: “The NIF “504000889” is not valid. Why: the last digit (check digit) does not match the other eight. How to fix it: Check the number on the citizen card or the tax identification document and type it again.”
- What to do: correct the NIF on the indicated row, in the file, and click Load File.
“Account codes must be unique”
- Symptom: “Error at row 3: "Account codes must be unique. You can't create accounts with these duplicate codes: 2111"”.
- What to do: change the account code in the file, or remove the row if the account already exists.
“Value 'gasto' not found in selection field 'Type'”
- What to do: use one of the values from See possible values (for example “Expenses” or
expense).
“Already exists: "…" (NIF …, reference …)”
- Symptom: when you import a customer or supplier file again, Test and Import reject every row that already exists, for example: “Error at row 1: "Already exists: "Cliente Delta, Lda" (NIF 503000779, reference CL001). Importing it again would create a duplicate. Remove this row from the file, or add the column "External ID" with the external identifier of the existing contact to update it instead."”. Nothing is saved.
- Cause: the import does not create duplicate records: it looks for records with the same NIF or the same reference.
- What to do: remove the rows that already exist from the file and import only the new ones. To correct an existing record, do it on the customer's or supplier's screen.