Reset cache for check and fields_view_get when writing res.user

This commit is contained in:
Cédric Krier
2009-01-26 09:53:02 +01:00
parent b3a2ab32fb
commit e8ccf32d51
+8
View File
@@ -128,6 +128,14 @@ class User(OSV):
self.pool.get('ir.rule').domain_get(cursor.dbname)
# Restart the cache for get_groups
self.get_groups(cursor.dbname)
# Restart the cache of check
self.pool.get('ir.model.access').check(cursor.dbname)
# Restart the cache
for model in self.pool.object_name_list():
try:
self.pool.get(model).fields_view_get(cursor.dbname)
except:
pass
return res
def delete(self, cursor, user, ids, context=None):