[IMP] Refactor ir.ui.view's read_template cache invalidation

This commit is contained in:
Fabien Meghazi 2014-09-17 15:52:47 +02:00
parent 720e31d0fb
commit 0084646475
1 changed files with 2 additions and 2 deletions

View File

@ -257,7 +257,7 @@ class view(osv.osv):
if not values.get('name'):
values['name'] = "%s %s" % (values.get('model'), values['type'])
self.read_template.clear_cache(self)
self.clear_cache()
return super(view, self).create(
cr, uid,
self._compute_defaults(cr, uid, values, context=context),
@ -275,7 +275,7 @@ class view(osv.osv):
if custom_view_ids:
self.pool.get('ir.ui.view.custom').unlink(cr, uid, custom_view_ids)
self.read_template.clear_cache(self)
self.clear_cache()
ret = super(view, self).write(
cr, uid, ids,
self._compute_defaults(cr, uid, vals, context=context),