diff --git a/testserver_o2b/hooks.py b/testserver_o2b/hooks.py index 3f92f6d..bf0a7b9 100644 --- a/testserver_o2b/hooks.py +++ b/testserver_o2b/hooks.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- -from odoo import SUPERUSER_ID, api +from odoo import api -def post_init_hook(cr, registry): - env = api.Environment(cr, SUPERUSER_ID, {}) +def post_init_hook(env): env['ir.logging'].sudo().cleanup_unneeded_filestore_attachments(limit=50)