Saturday, July 19, 2025
1 change · saas-18.1
Enhancements to existing features
Purchase order lines linked to a project now retain any existing cost allocation while also adding the project allocation when there is no conflict. This helps ensure project costs are tracked more completely without overwriting manually entered or model-based allocations.
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