From 798cf867f608a196d09601cebf6f6836f4eea433 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 27 Jun 2011 13:32:21 +0200 Subject: [PATCH] [FIX] m2o's get_value() should return false when internal value is null bzr revid: fme@openerp.com-20110627113221-br4h8hfedzbbhd22 --- addons/base/static/src/js/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base/static/src/js/form.js b/addons/base/static/src/js/form.js index c9f5afe8923..597a0c7f9b9 100644 --- a/addons/base/static/src/js/form.js +++ b/addons/base/static/src/js/form.js @@ -1303,7 +1303,7 @@ openerp.base.form.FieldMany2One = openerp.base.form.Field.extend({ if (this.tmp_value instanceof Array) { return this.tmp_value[0]; } - return this.tmp_value; + return this.tmp_value === null ? false : this.tmp_value; } if (this.value === undefined) throw "theorically unreachable state";