From 0addd5540bfc24bff3aa2f66d78c24d83b6d275e Mon Sep 17 00:00:00 2001 From: Dave Lasley Date: Mon, 16 Jan 2017 05:09:18 -0800 Subject: [PATCH] [FIX] base_multi_image: Use env in uninstall_hook (#677) * [FIX] base_multi_image: Use env in uninstall_hook --- base_multi_image/hooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base_multi_image/hooks.py b/base_multi_image/hooks.py index 8ef2c2243..d01792a9a 100644 --- a/base_multi_image/hooks.py +++ b/base_multi_image/hooks.py @@ -77,8 +77,8 @@ def uninstall_hook_for_submodules(cr, registry, model): model will be deleted """ Image = registry["base_multi_image.image"] - ids = Image.search(cr, SUPERUSER_ID, [("owner_model", "=", model)]) - Image.unlink(cr, SUPERUSER_ID, ids) + images = Image.search([("owner_model", "=", model)]) + images.unlink() def table_has_column(cr, table, field):