[IMP] views: don't prevent always -> disabled writes in views, is confusing and not...
authorXavier Morel <xmo@openerp.com>
Thu, 5 Jun 2014 10:22:37 +0000 (12:22 +0200)
committerXavier Morel <xmo@openerp.com>
Thu, 5 Jun 2014 10:22:37 +0000 (12:22 +0200)
openerp/addons/base/ir/ir_ui_view.py

index aab5044..f3b6dab 100644 (file)
@@ -268,14 +268,6 @@ class view(osv.osv):
         if custom_view_ids:
             self.pool.get('ir.ui.view.custom').unlink(cr, uid, custom_view_ids)
 
-        if vals.get('application') == 'disabled':
-            from_always = self.search(
-                cr, uid, [('id', 'in', ids), ('application', '=', 'always')], context=context)
-            if from_always:
-                raise ValueError(
-                    "Can't disable views %s marked as always applied" % (
-                        ', '.join(map(str, from_always))))
-
         self.read_template.clear_cache(self)
         ret = super(view, self).write(
             cr, uid, ids,