[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
This commit is contained in:
Olivier Dony 2012-09-24 12:40:26 +02:00
parent 6c60619a2b
commit 470415ced9
1 changed files with 1 additions and 2 deletions

View File

@ -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=[]