Daily updates from Odoo
Saturday, July 19, 2025
1 change · saas-18.4
Enhancements to existing features
Purchase orders linked to a project now keep the project cost allocation alongside existing manual or model-based allocations when they do not conflict. This improves cost tracking by ensuring project-related purchasing expenses are consistently assigned without overwriting other valid accounting distributions.
Original PR description
Currently, if a purchase order line has an analytic distribution and then a project with an analytic account is added to the PO, the project analytic distribution is not added. Only in lines without any analytic distribution, the projetc account is added as expected. This commit modifies `_compute_analytic_distribution()` to keep both the project account and the existing analytic distribution (that were added manually or from a distribution model) in all PO lines where the analytic plans do not conflict. task-4904044 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#216814