Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
139 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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

Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
set 25
5
4
set 25
1135
3
set 25
297
1
ago 25
228
1
ago 25
303