From e8ccf32d514c5b75aa97d27ef1cbe45af87ee67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 26 Jan 2009 09:53:02 +0100 Subject: [PATCH] Reset cache for check and fields_view_get when writing res.user --- trytond/res/user.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/trytond/res/user.py b/trytond/res/user.py index af0fd2268e..8cdb9c49ef 100644 --- a/trytond/res/user.py +++ b/trytond/res/user.py @@ -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):