[FIX] incorrect view in super() call
authorXavier Morel <xmo@openerp.com>
Mon, 15 Apr 2013 10:57:44 +0000 (12:57 +0200)
committerXavier Morel <xmo@openerp.com>
Mon, 15 Apr 2013 10:57:44 +0000 (12:57 +0200)
super() finds the MRO parent of the provided class to resume the
execution chain from there, so the class being defined should be
provided.

Here view called super(osv.osv, self).create so if osv.osv (Model) had
a create() defined (which luckily it does not) it would've been
skipped.

bzr revid: xmo@openerp.com-20130415105744-cfx47t01oc7loyes

openerp/addons/base/ir/ir_ui_view.py

index 09f7366..46e08cc 100644 (file)
@@ -100,7 +100,7 @@ class view(osv.osv):
             else:
                 inferred_type = etree.fromstring(values['arch'].encode('utf8')).tag
             values['name'] = "%s %s" % (values['model'], inferred_type)
-        return super(osv.osv, self).create(cr, uid, values, context)
+        return super(view, self).create(cr, uid, values, context)
 
     def _relaxng(self):
         if not self._relaxng_validator: