From c4da7a2c7c276cf373d20493cc6f7079d14252e1 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Mon, 28 Jun 2010 14:00:10 +0200 Subject: [PATCH] [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 --- bin/osv/orm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 7bf79d5e693..56c55efe2f8 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -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: