[FIX] ir_ui_view noupdate only if arch change, otherwise it flags them when you check them in customize

bzr revid: al@openerp.com-20140129051009-iuqpdz8a6qta6dx5
This commit is contained in:
Antony Lesuisse 2014-01-29 06:10:09 +01:00
parent 7eebddd09a
commit 8bed2fb861
1 changed files with 2 additions and 2 deletions

View File

@ -179,8 +179,8 @@ class view(osv.osv):
self.read_template.clear_cache(self)
ret = super(view, self).write(cr, uid, ids, vals, context)
if not context.get('install_mode', False):
# touched views become noupdatable
# if arch is modified views become noupdatable
if 'arch' in vals and not context.get('install_mode', False):
# TODO: should be doable in a read and a write
for view_ in self.browse(cr, uid, ids, context=context):
if view_.model_data_id: