a742279ad27f221326f8823f55ac6eaa2eb3856c
In the previous commit the analytic entries generation when posting a move was optimized to be done in batch. The performance is break when sale module is installed. Indeed, in case of reinvoicing a analytic line, AAL creation will trigger a sale.line creation. This mecanism is very inefficient because 1/ AAL creation and Sales line creation are not batched 2/ sale line creation is done after the AAL creation, and then linked with a `write` operation. So one `create` and one `write` per AAL to reinvoice. 3/ To determine on which Sales Order to reinvoice, many `search` can be performed per AAL. Also, this looks strange that AAL creation might result into a sales line creation. This commit changes this in order to optimize and clean the code: - the account.move.line (that creates the AAL) will also create the Sales lines - SO lines creation will be done in batch - minimize the number of `search` done during the process - the SO line will be linked to the AAL by passing the SO line id in the create values of AAL (no `write` operation one AAL and SOL are created). This was the last part of legacy code of 'sale_analytic.py' that we need to get rid of. There are still work to do, but I think now, the business case handled here can now breathe and have a peacefull life. Task-1911898 closes odoo/odoo#28939 Signed-off-by: Jérome Maes (jem) <jem@openerp.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, Purchase Management, ...
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.
Then follow the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%