Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
106 Ansichten

I tried to import journal entries with analytic distribution, I tried to put them in a JSON form but when I made the import the analytic distribution was empty

this form I tried:
{"analytic account name": percentage}

here is an example

01/04/2025 JV Tax invoice# CR-13531 Materials & Raw Materials 625.00 {"Al Khan G + 15 - 211": 100}
Vat 5% 31.25
Suppliers & Creditors Al Dammam Elect. & Sanit. Ware Trdg. 656.25


what should I do so the analytic distribution is imported correctly?

Avatar
Verwerfen
Beste Antwort

Hi,


In Odoo, analytic distributions must be imported using the analytic account’s external ID or database ID, not its name. When you tried {"Al Khan G + 15 - 211": 100}, Odoo couldn’t match the name, so the distribution was left empty. To fix this, you should first get the external ID of the analytic account (via Settings → Technical → External Identifiers), then use that in the JSON field, for example {"analytic_al_khan_211": 100}. If you need to split across multiple accounts, you can add more keys and percentages, like {"analytic_al_khan_211": 70, "analytic_other_project": 30}. This way, the analytic distribution will import correctly.



For more information, refer to  the following


OCA Module

* https://odoo-community.org/groups/contributors-15/contributors-1936163


Solved Forum

* https://www.odoo.com/es/forum/ayuda-1/analytic-distribution-analytic-account-import-journal-entry-via-excel-236457

* https://www.odoo.com/es/forum/ayuda-1/v16-how-do-i-import-journal-entries-with-an-analytic-account-distribution-226866


Hope it helps

Avatar
Verwerfen
Autor

thank you for the help
I took the database id for the analytic account and it worked perfectly

Beste Antwort

The most reliable and dependable way to understand how to import anything in Odoo is to first create a record representing what you want to import and EXPORT it first.

You will then see that the format of the Analytic Distribution field is the ID (ie: 90) of the Analytic Account:

{"90", 100.0}
Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
3
Sept. 25
279
1
Aug. 25
221
1
Aug. 25
298
0
Aug. 25
178
1
Aug. 25
222