From 470415ced97698c66bab4ae912e6d08c4831e54d Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 24 Sep 2012 12:40:26 +0200 Subject: [PATCH] [IMP] ir.ui.view: discard custom views before updating view arch - as the custom views are still in place when validating the new arch, they would hide the new arch and prevent proper validation (if custom views are set for uid 1) - conversely, if the RNG validation has changed, the old view customizations may not pass the updated validation rules, and cause spurious validation errors bzr revid: odo@openerp.com-20120924104026-z7bjzzq80ifxy1oc --- openerp/addons/base/ir/ir_ui_view.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openerp/addons/base/ir/ir_ui_view.py b/openerp/addons/base/ir/ir_ui_view.py index bad2c3d85af..9208297cf84 100644 --- a/openerp/addons/base/ir/ir_ui_view.py +++ b/openerp/addons/base/ir/ir_ui_view.py @@ -192,7 +192,6 @@ class view(osv.osv): def write(self, cr, uid, ids, vals, context=None): if not isinstance(ids, (list, tuple)): ids = [ids] - result = super(view, self).write(cr, uid, ids, vals, context) # drop the corresponding view customizations (used for dashboards for example), otherwise # not all users would see the updated views @@ -200,7 +199,7 @@ class view(osv.osv): if custom_view_ids: self.pool.get('ir.ui.view.custom').unlink(cr, uid, custom_view_ids) - return result + return super(view, self).write(cr, uid, ids, vals, context) def graph_get(self, cr, uid, id, model, node_obj, conn_obj, src_node, des_node, label, scale, context=None): nodes=[]