72e8e06ad33d6989a29dd8cb3b64ab89e20fd479
Use Case ======== The cron run perfectly well when there is no concurrent transaction. But in real life users may interact with leads modified in the cron. This cause two issue: Concurrent update ----------------- If a lead is modified in another transaction during a the transaction where the lead is modified. The parameter crm.assignment.commit.bundle allow to reduce the size of the transaction but before this commit the first transaction was always way longer because it took the time to handle the bundle + the fetching of all the data at the begining of the cron. The solution: start a new transaction after the preparation of the data is done Missing record -------------- If the a lead is deleted in another transaction before the transaction that modified the lead starts. The code will then try to access a record which does not exist anymore in the database causing a Cache Miss and Missing record error. The solution: Make sure a record exists in the current transaction before using it. It reduce a little bit the performance of the cron but avoiding the crashes is at this price. Discussion ---------- This commit does not remove completely the risk of crash due to concurrent update but reduce its probability a lot. To remove the risk of crash, a proper exception management should be implement in a further commit closes odoo/odoo#74166 X-original-commit: 4a70f7539ec53b9c3419f83d584ad99111d2e172 Signed-off-by: Thibault Delavallee (tde) <tde@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, ...
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%