Don't call twice default for inherited fields

Calling default for inherited fields make that we loose the ir.default values
from the inherited Model.
This commit is contained in:
Cédric Krier committed 2010-10-19 22:30:29 +02:00
1 parent 5373841e81
commit c8df0f7893
1 file changed
+1 -1
+1 -1
View File
@@ -507,7 +507,7 @@ class Model(object):
# get the default values defined in the object
for field in fields_names:
if field in self._defaults:
if field in self._defaults and field not in self._inherit_fields:
value[field] = self._defaults[field]()
if field in self._columns:
if self._columns[field]._type == 'boolean' and \