[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:
parent
2f974012db
commit
bd444b8a5e
|
@ -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':
|
||||
|
|
|
@ -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
|
||||
|
||||
#----------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue