[FIX] osv_memory objects have to receive a default value for each existing field, not only the ones that are not readonly

bzr revid: qdp-launchpad@tinyerp.com-20100628120010-kk2b7v94om0kpam1
This commit is contained in:
qdp-launchpad@tinyerp.com 2010-06-28 14:00:10 +02:00
parent f223434ff6
commit c4da7a2c7c
1 changed files with 2 additions and 1 deletions

View File

@ -1865,7 +1865,8 @@ class orm_memory(orm_template):
self.view_init(cr, uid, fields_list, context)
if not context:
context = {}
value = {}
# we define default value for each field existing in the object
value = dict.fromkeys(fields_list)
# get the default values for the inherited fields
for f in fields_list:
if f in self._defaults: