From 3d54c3265cccd1749003ff1657074015c7df6132 Mon Sep 17 00:00:00 2001 From: Moens Alexandre Date: Fri, 19 Jan 2024 17:28:27 +0100 Subject: [PATCH] [FIX] base: neutralize keep only autovacuum_job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The root of the issue: The external identifiers are not guaranteed to be unique on their `name` alone, the unique constraint is on the `name` and on the `module` fields. Before this commit: If a user or third party app were for example to create an external identifier "project.autovacuum_job" and point it to an `ir.cron` record, then that `ir.cron` would also be kept activated, which could cause major issue if it makes calls to external systems, sends mail, etc... After this commit: All the crons are deactivated by the neutralisation, except for the autovacuum closes odoo/odoo#152535 X-original-commit: 0cc89a026d05b37714864e7ebb695e77ef2d1e7d Signed-off-by: Jérémy Kersten Signed-off-by: Alexandre Moens (mao) --- odoo/addons/base/data/neutralize.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/addons/base/data/neutralize.sql b/odoo/addons/base/data/neutralize.sql index 47308bd5245..dd506f63021 100644 --- a/odoo/addons/base/data/neutralize.sql +++ b/odoo/addons/base/data/neutralize.sql @@ -14,6 +14,7 @@ UPDATE ir_cron FROM ir_model_data WHERE model = 'ir.cron' AND name = 'autovacuum_job' + AND module = 'base' ); -- neutralization flag for the database