04a352ea760ee8205fc2e928cbb9a7dd4c85049c
Steps to reproduce: - create two products - create two analytic accounts - create two new analytic rules by assigning an account to a product - Create a new PO and select on of the product - On the same line, change the product to the other one Issue: - The analytic account won't be updated Cause: Bypass of the `account_analytic_id` whenever there is already on defined Solution: For the `Sale` fix, I added the `line.state == 'draft'`. The reason? Because the compute is triggered after confirmation of the order due to: https://github.com/odoo/odoo/blob/14.0/addons/sale/models/sale.py#L931-L935 Therefore, the compute won't also be triggered after confirmation of the SO. opw-2948950 closes odoo/odoo#99858 X-original-commit: 61604e18128c1cfd0e6d4e510852f780491d6e4e Signed-off-by: William André (wan) <wan@odoo.com>
…
…
…
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%