From 87e07f2227fe7c0b55c17faaff96038d9ca03eb2 Mon Sep 17 00:00:00 2001 From: Edilio Escalona Almira <51337671+edescalona@users.noreply.github.com> Date: Sun, 1 Mar 2026 11:45:58 -0500 Subject: [PATCH] Rename lookup.__cache__ to lookup.cache fix(odoo-cache): add backward-compatible cache alias in ormcache wrappers Expose both `__cache__` and `cache` on decorated methods in `odoo.tools.cache` (core and enterprise copies) to avoid crashes when mixed addon revisions call either attribute. This fixes website routing failure: AttributeError: 'function' object has no attribute 'cache' --- odoo/tools/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/tools/cache.py b/odoo/tools/cache.py index 9cb568356b5b4..854064d63c576 100644 --- a/odoo/tools/cache.py +++ b/odoo/tools/cache.py @@ -59,7 +59,7 @@ def __call__(self, method): self.method = method self.determine_key() lookup = decorator(self.lookup, method) - lookup.__cache__ = self + lookup.cache = self return lookup def add_value(self, *args, cache_value=None, **kwargs):