Skip to Content
Menu
This question has been flagged

I would like to programmatically (ie: via ORM) give a value to this field based on a distribution of 100% to a specific Analytic Account. 

What kind of Python code would I need to write in order to supply a value for the new Analytic Distribution field at Odoo 16?

Are there examples of how to use ORM to define a distribution for a single or for multiple Analytic Accounts?


Avatar
Discard
Best Answer

You can see how we do this via the test framework.

Review https://github.com/odoo/odoo/blob/16.0/addons/account/tests/test_account_analytic.py


When using a dictionary for a new record, supply something like:



Via assignment, do something like:


Avatar
Discard
Related Posts Replies Views Activity
0
Oct 23
687
1
Jul 23
3466
0
Nov 22
1891
1
Feb 22
4954
0
Jan 20
3265