[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) <xmo@odoo.com>
This commit is contained in:
@@ -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)]"
|
||||
|
||||
Reference in New Issue
Block a user