diff --git a/odoo/api.py b/odoo/api.py index 7626c1137f5..e6c3f174305 100644 --- a/odoo/api.py +++ b/odoo/api.py @@ -475,22 +475,6 @@ class Environment(Mapping): names to models. It also holds a cache for records, and a data structure to manage recomputations. """ - @classproperty - def envs(cls): - raise NotImplementedError( - "Since Odoo 15.0, Environment.envs no longer works; " - "use cr.transaction or env.transaction instead." - ) - - @classmethod - @contextmanager - def manage(cls): - warnings.warn( - "Since Odoo 15.0, Environment.manage() is useless.", - DeprecationWarning, stacklevel=2, - ) - yield - def reset(self): """ Reset the transaction, see :meth:`Transaction.reset`. """ self.transaction.reset() @@ -701,16 +685,6 @@ class Environment(Mapping): lazy_property.reset_all(self) self.transaction.clear() - def clear_upon_failure(self): - """ Context manager that rolls back the environments (caches and pending - computations and updates) upon exception. - """ - warnings.warn( - "Since Odoo 15.0, use cr.savepoint() instead of env.clear_upon_failure().", - DeprecationWarning, stacklevel=2, - ) - return self.cr.savepoint() - def invalidate_all(self, flush=True): """ Invalidate the cache of all records.