[IMP] gunicorn: connect ir_ui_cache with the signaling code.

bzr revid: vmt@openerp.com-20120209110703-swsi7gckc46zqx40
This commit is contained in:
Vo Minh Thu
2012-02-09 12:07:03 +01:00
parent db81164095
commit bad0bc8511
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -50,6 +50,10 @@ class ir_ui_menu(osv.osv):
def clear_cache(self):
with self.cache_lock:
# radical but this doesn't frequently happen
if self._cache:
# Normally this is done by openerp.tools.ormcache
# but since we do not use it, set it by ourself.
self.pool._any_cache_cleared = True
self._cache = {}
def _filter_visible_menus(self, cr, uid, ids, context=None):
+5
View File
@@ -126,6 +126,11 @@ class Registry(object):
"""
for model in self.models.itervalues():
model.clear_caches()
# Special case for ir_ui_menu which does not use openerp.tools.ormcache.
ir_ui_menu = self.models.get('ir.ui.menu')
if ir_ui_menu:
ir_ui_menu.clear_cache()
# Useful only in a multi-process context.
def reset_any_cache_cleared(self):