diff --git a/trytond/res/group.py b/trytond/res/group.py index 2d4ce47ac7..936a2355bd 100644 --- a/trytond/res/group.py +++ b/trytond/res/group.py @@ -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: diff --git a/trytond/res/user.py b/trytond/res/user.py index e50c8fd9db..102ba48718 100644 --- a/trytond/res/user.py +++ b/trytond/res/user.py @@ -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()