Hello,
I am currently trying to connect our app to Odoo accounting services, via external API. First of all I am creating the Vendor Bill which is successfully created it is connected to partner, currency etc. Then I am creating analytic line, which is connected to analytic account. Then i would like to create the account.move.line (aka lineitem) where I would like to fill analytic_distribution for coresponding analytic accounts, however I am not able to fill the analytic_distribution the correct way.
There are some examples which I already tried:
[
{
"account_id": 611,
"analytic_distribution": {
55: 100
},
"analytic_line_ids": [
2033
],
"currency_id": 1,
"display_type": "product",
"move_id": 43667,
"name": "Test",
"price_unit": 10,
"quantity": 1,
"ref": "Test",
"tax_ids": [
19
]
}
]
OR
[
{
"account_id": 611,
"analytic_distribution": {
"account_id": 55,
"amount": 100
},
"analytic_line_ids": [
2034
],
"currency_id": 1,
"display_type": "product",
"move_id": 43668,
"name": "Test",
"price_unit": 10,
"quantity": 1,
"ref": "Test",
"tax_ids": [
19
]
}
]
So if anyone would have any idea, what am I doing wrong, I would really appreciate it :