From 215ccd11940aa2180e406ccd0ca7076c1f7edddc Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 11 Apr 2023 11:18:44 +0000 Subject: [PATCH] [FIX] website_slides_survey: fix uninstall_hook When #114353 forward port of #112425 which adds an uninstall_hook was merged, it was not updated with the API change of #108254, which replaced the `(cr, registry)` parameters by a sole `(env)` as most if not all uninstall hooks immediately created an environment anyway. So this hook has been breaking uninstall on anything on which `website_slides_survey` depends since it was merged. Fix the hook to match the new API. closes odoo/odoo#118296 X-original-commit: 201a4b369cf1652a2da763181f6837cfb7f44f3e Signed-off-by: Xavier Morel (xmo) --- addons/website_slides_survey/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/website_slides_survey/__init__.py b/addons/website_slides_survey/__init__.py index 8469b90f5c1..926db917bbe 100644 --- a/addons/website_slides_survey/__init__.py +++ b/addons/website_slides_survey/__init__.py @@ -4,10 +4,7 @@ from . import models from . import controllers -from odoo import api, SUPERUSER_ID - -def uninstall_hook(cr, registry): - env = api.Environment(cr, SUPERUSER_ID, {}) +def uninstall_hook(env): dt = env.ref('website_slides.badge_data_certification_goal', raise_if_not_found=False) if dt: dt.domain = "[('completed', '=', True), (0, '=', 1)]"