3eec4d6a69ff76cbf750b960dc8db2eb5e0a45f9
TL;DR ===== Improve performances with nearly a factor of 2. Use case, call action_validate on hr.leave for 100 employees - 1987 requests -> 844 requests - 1300 ms -> 700 ms Purpose ======= The first purpose of this commit is to add a test ensuring the number of request while creating a company leave for 100 employees, if 15 of them already have a leave during that period. It includes, the mass leave generation, and the conflicts resolutions. (Cancelling/Splitting the already existing one and adapting the dates accordingly). The second one is to reduce the number of request for this test. In term of requests, currently we have: - 5154 requests without bypassing the mail tracking + the activities management - 1987 requests when bypassing the mail post-process (this is the current value, the bypassing was already done several month ago) - 844 requests with all the optimization done in resource/calendar/hr_holidays In terms of execution time, we have a reduction from +- 1300 ms to call the method action_validate to +- 700 ms As the performances issues severity increases with the number of leaves to create and the real time access to the database, on the production base, we reduced the execution time to generate more than 500 hr.leaves from several minutes to 21 seconds. A fix to avoid deadlock was already made at https://github.com/odoo/enterprise/pull/10740/files Some contortions were made to avoid changing a signature method in a stable release and thus introducing for each method a second one, with the "batched" implementation, to keep a retro-compatibility for the existing custom code. But surely this could be cleaned in the master version. The old one will be deprecated while waiting to be removed in a few versions. closes odoo/odoo#56534 Taskid: 2256705 X-original-commit: 8c96a887d3f05680c923dcd44f9c70c0e5e0bd32 Related: odoo/enterprise#12670 Signed-off-by: Yannick Tivisse (yti) <yti@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%