Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
136 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

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

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
zář 25
292
1
srp 25
228
1
srp 25
303
0
srp 25
179
1
srp 25
231