~openerp-dev/openobject-server/trunk-staging-mat

« back to all changes in this revision

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

  • Committer: Martin Trigaux
  • Date: 2014-05-12 08:05:23 UTC
  • mfrom: (5189.1.22 saas-4)
  • Revision ID: mat@openerp.com-20140512080523-t1ugjl53jfgohfde
Forward-port of latest saas-4, up to revision 5211 (revid fme@openerp.com-20140509164408-rtml4brrhpiv4zz9)

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
 
219
219
        self.read_template.clear_cache(self)
220
220
        ret = super(view, self).write(cr, uid, ids, vals, context)
221
 
 
222
 
        # if arch is modified views become noupdatable
223
 
        if 'arch' in vals and not context.get('install_mode', False):
224
 
            # TODO: should be doable in a read and a write
225
 
            for view_ in self.browse(cr, uid, ids, context=context):
226
 
                if view_.model_data_id:
227
 
                    self.pool.get('ir.model.data').write(cr, openerp.SUPERUSER_ID, view_.model_data_id.id, {'noupdate': True})
228
221
        return ret
229
222
 
230
223
    def copy(self, cr, uid, id, default=None, context=None):