odoo/openerp/addons/test_inherit
Raphael Collet 36174fcc6e [IMP] fields: set the default value to the closest field.default or _defaults
This solves a subtle issue: in the following case, the class Bar should
override the default value set by Foo.  But in practice it was not working,
because _defaults is looked up before field.default.

    class Foo(models.Model):
        _name = 'foo'
        _columns = {
            'foo': fields.char('Foo'),
        }
        _defaults = {
            'foo': "Foo",
        }

    class Bar(models.Model):
        _inherit = 'foo'
        foo = fields.Char(default="Bar")

The change makes field.default and the model's _defaults consistent with each
other.
2014-10-09 09:18:02 +02:00
..
tests [IMP] fields: set the default value to the closest field.default or _defaults 2014-10-09 09:18:02 +02:00
__init__.py [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00
__openerp__.py [FIX] fields: in to_column(), returning self.column is generally not correct 2014-10-08 16:39:59 +02:00
demo_data.xml [FIX] fields: in to_column(), returning self.column is generally not correct 2014-10-08 16:39:59 +02:00
ir.model.access.csv [IMP] test_inherit: add test case, redefine Many2one field in inherited model 2014-08-22 10:01:41 +02:00
models.py [IMP] fields: set the default value to the closest field.default or _defaults 2014-10-09 09:18:02 +02:00