[FIX] ir_ui_view: add method clear_cache called when user change user groups

bzr revid: chm@openerp.com-20140117143853-sy5ehfk9n2wrzq41
This commit is contained in:
Christophe Matthieu 2014-01-17 15:38:53 +01:00
parent 2f974012db
commit bd444b8a5e
2 changed files with 5 additions and 0 deletions

View File

@ -709,6 +709,9 @@ class view(osv.osv):
arch = etree.tostring(root, encoding='utf-8', xml_declaration=True)
return arch
def clear_cache(self):
self.read_template.clear_cache(self)
def distribute_branding(self, e, branding=None, parent_xpath='',
index_map=misc.ConstantMapping(1)):
if e.get('t-ignore') or e.tag == 'head':

View File

@ -600,6 +600,7 @@ class users_implied(osv.osv):
if groups:
# delegate addition of groups to add implied groups
self.write(cr, uid, [user_id], {'groups_id': groups}, context)
self.pool['ir.ui.view'].clear_cache()
return user_id
def write(self, cr, uid, ids, values, context=None):
@ -612,6 +613,7 @@ class users_implied(osv.osv):
gs = set(concat([g.trans_implied_ids for g in user.groups_id]))
vals = {'groups_id': [(4, g.id) for g in gs]}
super(users_implied, self).write(cr, uid, [user.id], vals, context)
self.pool['ir.ui.view'].clear_cache()
return res
#----------------------------------------------------------