From 7c45a771381690c2a4f8bc764e4385aca6981e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 23 Aug 2013 14:02:23 +0200 Subject: [PATCH] Many2One.get must not return undefined value When setting undefined as value of an Object, the key is deleted within the json-rpc call. --- src/model.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/model.js b/src/model.js index 8c23d410dc..2084553dfc 100644 --- a/src/model.js +++ b/src/model.js @@ -1226,6 +1226,9 @@ _default: null, get: function(record) { var value = record._values[this.name]; + if (value === undefined) { + value = this._default; + } // TODO force parent return value; },