diff --git a/odoo/api.py b/odoo/api.py index 6ad93648155..507c7153b7f 100644 --- a/odoo/api.py +++ b/odoo/api.py @@ -508,6 +508,7 @@ class Environment(Mapping): return env # otherwise create environment, and add it in the set + assert isinstance(cr, BaseCursor) self = object.__new__(cls) self.cr, self.uid, self.context, self.su = self.args = (cr, uid, frozendict(context), su) self.uid_origin = uid_origin @@ -1361,3 +1362,4 @@ class Starred: # keep those imports here in order to handle cyclic dependencies correctly from odoo import SUPERUSER_ID from odoo.modules.registry import Registry +from .sql_db import BaseCursor