~openerp-dev/openobject-server/trunk-forward-port-mat

« back to all changes in this revision

Viewing changes to openerp/addons/base/ir/ir_ui_view.py

[MOV] ir.ui.view#write() forced noupdate moved in `website` (RTE only)

Show diffs side-by-side

added added

removed removed

Lines of Context:
204
204
 
205
205
        self.read_template.clear_cache(self)
206
206
        ret = super(view, self).write(cr, uid, ids, vals, context)
207
 
 
208
 
        # if arch is modified views become noupdatable
209
 
        if 'arch' in vals and not context.get('install_mode', False):
210
 
            # TODO: should be doable in a read and a write
211
 
            for view_ in self.browse(cr, uid, ids, context=context):
212
 
                if view_.model_data_id:
213
 
                    self.pool.get('ir.model.data').write(cr, openerp.SUPERUSER_ID, view_.model_data_id.id, {'noupdate': True})
214
207
        return ret
215
208
 
216
209
    def copy(self, cr, uid, id, default=None, context=None):