[FIX] models: make field inheritance work when source field is defined in old api
[odoo/odoo.git] / openerp / addons / test_inherit / models.py
index e1957ab..a02b366 100644 (file)
@@ -1,11 +1,15 @@
 # -*- coding: utf-8 -*-
-from openerp import models, fields, api
+from openerp import models, fields, api, osv
 
 # We just create a new model
 class mother(models.Model):
     _name = 'test.inherit.mother'
 
-    name = fields.Char('Name', required=True)
+    _columns = {
+        # check interoperability of field inheritance with old-style fields
+        'name': osv.fields.char('Name', required=True),
+    }
+
     surname = fields.Char(compute='_compute_surname')
     state = fields.Selection([('a', 'A'), ('b', 'B')])