diff options
| author | hda@tinyerp.com <> | 2008-11-10 10:42:26 +0530 |
|---|---|---|
| committer | hda@tinyerp.com <> | 2008-11-10 10:42:26 +0530 |
| commit | 47d75d03e524c19352010677e50f2aa55000aede (patch) | |
| tree | 625665eb6987b73ad02b666c4289761d935d0a4f /bin/addons/base | |
| parent | 5211b0803c7a6544c63798d8705152785c6c7b9d (diff) | |
| parent | 808d552be8360d02485572b2543f757a32980f23 (diff) | |
solved import zip problem (ref:nch)
bzr revid: hda@tinyerp.com-20081110051226-ovyliknq3w8mmxr6
Diffstat (limited to 'bin/addons/base')
| -rw-r--r-- | bin/addons/base/ir/ir_ui_view.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/addons/base/ir/ir_ui_view.py b/bin/addons/base/ir/ir_ui_view.py index f34999e059e..d10d1082709 100644 --- a/bin/addons/base/ir/ir_ui_view.py +++ b/bin/addons/base/ir/ir_ui_view.py @@ -73,6 +73,16 @@ class view(osv.osv): (_check_xml, 'Invalid XML for View Architecture!', ['arch']) ] + def create(self, cr, uid, vals, context={}): + if 'inherit_id' in vals: + obj=self.browse(cr,uid,vals['inherit_id']) + if not obj.model==vals['model']: + raise Exception("Inherited view model [%s] and \ + \n\n base view model [%s] do not match \ + \n\n It should be same as base view model " \ + %(vals['model'],obj.model)) + return super(view,self).create(cr, uid, vals, context={}) + def read(self, cr, uid, ids, fields=None, context={}, load='_classic_read'): if not isinstance(ids, (list, tuple)): |
