Add missing cache invalidations in res.group and res.user.

issue3447
review1381002
This commit is contained in:
Albert Cervera i Areny committed 2013-10-28 21:38:14 +01:00
1 parent 6bd350ff02
commit 34b420304e
2 files changed
+14

No files matched your search

+12
View File
@@ -82,6 +82,10 @@ class Group(ModelSQL, ModelView):
pool.get('res.user')._get_groups_cache.clear()
# Restart the cache for get_preferences
pool.get('res.user')._get_preferences_cache.clear()
# Restart the cache for model access and view
pool.get('ir.model.access')._get_access_cache.clear()
pool.get('ir.model.field.access')._get_access_cache.clear()
ModelView._fields_view_get_cache.clear()
return res
@classmethod
@@ -94,6 +98,10 @@ class Group(ModelSQL, ModelView):
pool.get('res.user')._get_groups_cache.clear()
# Restart the cache for get_preferences
pool.get('res.user')._get_preferences_cache.clear()
# Restart the cache for model access and view
pool.get('ir.model.access')._get_access_cache.clear()
pool.get('ir.model.field.access')._get_access_cache.clear()
ModelView._fields_view_get_cache.clear()
@classmethod
def delete(cls, groups):
@@ -105,6 +113,10 @@ class Group(ModelSQL, ModelView):
pool.get('res.user')._get_groups_cache.clear()
# Restart the cache for get_preferences
pool.get('res.user')._get_preferences_cache.clear()
# Restart the cache for model access and view
pool.get('ir.model.access')._get_access_cache.clear()
pool.get('ir.model.field.access')._get_access_cache.clear()
ModelView._fields_view_get_cache.clear()
class Group2:
+2
View File
@@ -240,6 +240,8 @@ class User(ModelSQL, ModelView):
cls._get_preferences_cache.clear()
# Restart the cache of check
pool.get('ir.model.access')._get_access_cache.clear()
# Restart the cache of check
pool.get('ir.model.field.access')._get_access_cache.clear()
# Restart the cache
ModelView._fields_view_get_cache.clear()