odoo/odoo — pull request #2987 by rco-odoo (2014-10-09 08:20:41+00:00)
Title: 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.