[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:
parent
6c60619a2b
commit
470415ced9
|
@ -192,7 +192,6 @@ class view(osv.osv):
|
||||||
def write(self, cr, uid, ids, vals, context=None):
|
def write(self, cr, uid, ids, vals, context=None):
|
||||||
if not isinstance(ids, (list, tuple)):
|
if not isinstance(ids, (list, tuple)):
|
||||||
ids = [ids]
|
ids = [ids]
|
||||||
result = super(view, self).write(cr, uid, ids, vals, context)
|
|
||||||
|
|
||||||
# drop the corresponding view customizations (used for dashboards for example), otherwise
|
# drop the corresponding view customizations (used for dashboards for example), otherwise
|
||||||
# not all users would see the updated views
|
# not all users would see the updated views
|
||||||
|
@ -200,7 +199,7 @@ class view(osv.osv):
|
||||||
if custom_view_ids:
|
if custom_view_ids:
|
||||||
self.pool.get('ir.ui.view.custom').unlink(cr, uid, 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):
|
def graph_get(self, cr, uid, id, model, node_obj, conn_obj, src_node, des_node, label, scale, context=None):
|
||||||
nodes=[]
|
nodes=[]
|
||||||
|
|
Loading…
Reference in New Issue