How to add an automated action that assigns the same analytic account for all the lines in a purchase order?
The analytic_distribution field is a JSON type in ODOO 16 enterprise. For example, to update the description of every line of the PO, I use the following code:
for n in records.order_line:
n.update({"name":"hello"})
I have already created a many-to-one field called "analytic_account_field" in the purchase order to serve as a basis to update all of the analytic distribution lines.
Thanks in advance