From 5bb31b70d81cdc8d522e25f5e01cc0d0ea72518d Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 30 Jan 2014 13:01:09 +0100 Subject: [PATCH] [FIX] ir.ui.view: one2many to ir.model.data needs domain otherwise it matches entries from other models bzr revid: odo@openerp.com-20140130120109-0z6kpzv5t155haog --- openerp/addons/base/ir/ir_ui_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/ir/ir_ui_view.py b/openerp/addons/base/ir/ir_ui_view.py index c1dbb9e3c59..a884d458771 100644 --- a/openerp/addons/base/ir/ir_ui_view.py +++ b/openerp/addons/base/ir/ir_ui_view.py @@ -87,7 +87,7 @@ class view(osv.osv): help="ID of the view defined in xml file"), 'groups_id': fields.many2many('res.groups', 'ir_ui_view_group_rel', 'view_id', 'group_id', string='Groups', help="If this field is empty, the view applies to all users. Otherwise, the view applies to the users of those groups only."), - 'model_ids': fields.one2many('ir.model.data', 'res_id', auto_join=True), + 'model_ids': fields.one2many('ir.model.data', 'res_id', domain=[('model','=','ir.ui.view')], auto_join=True), } _defaults = { 'priority': 16,