Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
132 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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

Najlepsza odpowiedź

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}
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
wrz 25
284
1
sie 25
223
1
sie 25
302
0
sie 25
178
1
sie 25
224