diff --git a/addons/web/http.py b/addons/web/http.py index b9873fb653e..fc75c323d3f 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -670,7 +670,7 @@ class Root(object): def __init__(self): self.addons = {} self.statics = {} - + self.db_routers = {} self.db_routers_lock = threading.Lock() @@ -707,12 +707,16 @@ class Root(object): with session_context(httprequest, self.session_store, self.session_lock, sid) as session: request = self._build_request(httprequest) + db = request.db + + updated = openerp.modules.registry.RegistryManager.check_registry_signaling(db) self.find_handler(request) - with set_request(request): result = request.dispatch() + openerp.modules.registry.RegistryManager.signal_caches_change(db) + if isinstance(result, basestring): headers=[('Content-Type', 'text/html; charset=utf-8'), ('Content-Length', len(result))] response = werkzeug.wrappers.Response(result, headers=headers)