Daily updates from Odoo
Wednesday, June 4, 2025
2 changes · 18.0
Enhancements to existing features
Invoices and vendor bills created from sales or purchase orders now keep the order’s existing analytic split while also adding matching analytic distribution rules. Sales orders that create projects also retain both the project analytic account and other non-conflicting analytic accounts, improving reporting accuracy without extra manual work.
Original PR description
The commits in this PR address two points: 1. An account move created from a Purchase Order or Sales Order with an Analytic Distribution only has the analytical distribution from the PO/SO. The invoice/vendor bill does not add the Analytic Accounts expected from matching Analytic Distribution Models. 2. When confirming a SO with a product that creates a project, the Analytic Distribution of the line is filled with the Analytic Account of the project. But this does not happen if there is already another AA in the line before confirming the SO. Another AA may be there because it was added manually or because of an existing distribution model set on the partner or the product. More information on each can be found in the commit messages. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Automated actions now log which action ran and how many records it processed. This helps teams identify poorly performing automations faster and investigate performance issues with clearer evidence.
Original PR description
It regularly happens that badly written automated actions have a negative impact on performances. Unfortunately, there little to no logging which would help the investigation. In other words, there is no clear log of which action is being executed. We improve the logging by recording which automated action is executed on how many records. This will give better clues to fix performance issues. Technical note: the `sudo()` is necessary since the automations are searched as superuser, but returned with the current user which might not have a read access. Test [2] is failing is no `sudo()` is set. [1] https://github.com/odoo/odoo/blob/6a244922b3fac8f3258726301373273d60871c27/addons/base_automation/models/base_automation.py#L608-L609 [2] https://github.com/odoo/odoo/blob/6a244922b3fac8f3258726301373273d60871c27/addons/base_automation/tests/test_automation.py#L75