From bbea52ee83965ec9e476d63db6847b782e9799cc Mon Sep 17 00:00:00 2001 From: dhx Date: Mon, 6 Jun 2022 12:23:37 +0200 Subject: [PATCH] [IMP] website_odoo_debranding: Avoid deprecation warning with 'Environment.manage()' Closes #899 --- website_odoo_debranding/hooks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website_odoo_debranding/hooks.py b/website_odoo_debranding/hooks.py index d7660e4c5d..763359b534 100644 --- a/website_odoo_debranding/hooks.py +++ b/website_odoo_debranding/hooks.py @@ -14,6 +14,5 @@ def post_init_hook(cr, registry): # For CI/CD avoids problems testing modules that removes/positioning elements # that other modules uses in their tests. if config["test_enable"] or config["test_file"]: - with api.Environment.manage(): - env = api.Environment(cr, SUPERUSER_ID, {}) - env.ref("website_odoo_debranding.layout_footer_copyright").active = False + env = api.Environment(cr, SUPERUSER_ID, {}) + env.ref("website_odoo_debranding.layout_footer_copyright").active = False