|
2 | 2 | Account Import Helper |
3 | 3 | ===================== |
4 | 4 |
|
5 | | -This module provides methods to help on the import of accounting-related data, in particular the chart of accounts. |
| 5 | +This module is designed to replace the standard chart of account of Odoo by the chart of accounts of the company before go-live. |
6 | 6 |
|
7 | | -First, in a standard test Odoo database with the chart of account of the official addons, use the wizard available via the menu *Configuration > Technical > Chart Generate > Chart Generate* to generate the file *account.account.csv*. |
| 7 | +This module has been fully re-written on december 30th 2025 ; if you were used to the old procedure, please read carefully the new procedure below. |
8 | 8 |
|
9 | | -Then, in the future production database, after the installation of the official addons that has the chart of accounts for the country: |
| 9 | +In the production database, install this module **account_import_helper** before go-live. As you are before go-live, there should be no journal items in the database. |
10 | 10 |
|
11 | | -* Unconfigure the links to the accounts from several objects and ir.properties: |
| 11 | +In developer mode, go to the menu **Settings > Technical > Tools for Chart of Accounts > Import Chart of Accounts** : it will start a wizard to import a custom chart of account from an XLSX file. The XLSX file should contain 2 columns with an optional third column: |
12 | 12 |
|
13 | | -.. code:: |
| 13 | +- column A: the account code (required) |
| 14 | +- column B: the label of the account (required) |
| 15 | +- column C: some notes related to the account (optional) |
14 | 16 |
|
15 | | - UPDATE account_journal SET default_account_id=null, suspense_account_id=null WHERE company_id=X; |
| 17 | +When you run the import, Odoo will use the account code and label (and notes) from the XLSX file and the fields *Type*, *Allow Reconciliation* and *Non Trade* from the standard Odoo chart of accounts (you can choose between using the chart of account of the module *l10n_fr_account* or the OCA module *l10n_fr_account_oca*). |
16 | 18 |
|
17 | | - UPDATE FROM pos_payment_method SET outstanding_account_id=null, receivable_account_id=null WHERE company_id=X; |
| 19 | +If you select several companies in the *Companies* field of the wizard, Odoo will import the chart of accounts as shared accounts between those companies (new feature of Odoo 18). |
18 | 20 |
|
19 | | - UPDATE ir_default SET json_value = false FROM ir_model_fields f WHERE f.id = ir_default.field_id AND f.relation = 'account.account' AND ir_default.company_id = X |
| 21 | +Once the chart of account has been imported, check that the imported accounts are ok. Check that you have one and only one account with type *Current Year Earnings*. |
20 | 22 |
|
21 | | - DELETE FROM account_fiscal_position_account WHERE company_id=X; |
| 23 | +Go to the menu **Settings > Technical > Tools for Chart of Accounts > Re-configure after Chart of Account Import**: it starts a wizard that make it easy to re-configure the default accounts for partners and product categories, and also the suspense account for bank/cash journals and the transfer account of the company. |
22 | 24 |
|
23 | | -* Delete all accounts: |
24 | | - |
25 | | -.. code:: |
26 | | -
|
27 | | - DELETE FROM account_account_res_company_rel WHERE res_company_id=X |
28 | | -
|
29 | | - DELETE FROM account_account WHERE id in (SELECT a.id FROM account_account a LEFT JOIN account_account_res_company_rel rel ON rel.account_account_id = a.id WHERE rel.account_account_id IS NULL) |
30 | | -
|
31 | | -* In the menu *Invoicing > Configuration > Accounting > Chart of accounts*, import the file *account.account.csv* with *Encoding* set to **utf-8** and *Use first row as header* enabled. |
| 25 | +Eventually: |
32 | 26 |
|
33 | 27 | * In the menu *Invoicing > Configuration > Accounting > Taxes*, reconfigure the account on taxes. |
34 | 28 |
|
35 | 29 | * In the menu *Invoicing > Configuration > Accounting > Fiscal Positions*, on each fiscal position, configure the account mapping. |
36 | 30 |
|
37 | 31 | * In the menu *Invoicing > Configuration > Accounting > Journals*, on each journal, configure all the fields that point to accounts. |
38 | 32 |
|
39 | | -* On the page *Invoicing > Configuration > Settings*, update the section *Default Accounts* |
40 | | - |
41 | | -* In the menu *Settings > Technical > Actions > User-defined Defaults*, edit the default having a 0 value including : |
42 | | - |
43 | | - - Account Receivable |
44 | | - - Account Payable |
45 | | - - Expense Account |
46 | | - - Income Account |
47 | | - |
48 | | -and set the field *Default Value (JSON format)* with **67** where 67 is the ID of the account you want to have as default for that property. |
| 33 | +* On the page *Invoicing > Configuration > Settings*, update the section *Default Accounts*. |
49 | 34 |
|
| 35 | +Once you have finished, you can uninstall the module **account_import_helper**. |
50 | 36 |
|
51 | 37 | Contributors |
52 | 38 | ============ |
|
0 commit comments