64b95a01d05422886cfe557dce0f3be93cfe97d8
During the uninstall step of the registry, we perform a commit right after the uninstallation of all module data, this commit is performed right before the creation of a new registry, this means that said commit will call `flush_env` and thus `recompute` on an environment that is based on a stale Registry (memory and database are unsynchronized). This means that during this specific moment, there's a chance that the recompute function may have to fetch some fields it depends on to perform its computations if said fields are not in cache, this in turn means that it will try to prefetch fields that are potentially no longer in the database, making the registry crash and preventing the uninstall. This is what happened with multiple if not all `payment_*` modules, the main module `payment` depends on a `ir.module.module` record, most notably the `color` field of the `payment.acquirer` model which depends on the `state` field which in turn depends on the `ir.module.module.state` field. This meant that uninstalling a module such as `payment_paypal` triggered a recompute of `payment.acquirer.color` during uninstall, and to perform that computation we need several `payment.acquirer` fields to be fetched from cache or the database. If in cache, the uninstall would go through without a hitch, if not in cache, we would fetch the required fields from the database but we'd also attempt to prefetch the fields introduced by `payment_paypal` that had just been deleted from the database! To avoid this, the `_module_uninstall_data` method of `ir.model.data` will henceforth guarantee that `ir.model.fields` that are to-be-deleted will have their prefetch set to False, meaning only existing fields will be fetched from the database during the uninstall of extending modules. Fixes #60424 opw-2372598 closes odoo/odoo#62247 X-original-commit: 7bffd2df0d5d7eff841cdf7ba7cb6ea84a5c5c49 Signed-off-by: Raphael Collet (rco) <rco@openerp.com> Co-authored-by: Raphael Collet <rco@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%