summaryrefslogtreecommitdiff
path: root/addons/base/static
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2011-08-26 16:04:21 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2011-08-26 16:04:21 +0200
commitc4d8acabba1e4449eefbf3883dafa3effb0fc9f5 (patch)
treed0f9a6428560c4050bcf7dfcac0ddec803746420 /addons/base/static
parentb8d25dc2b812488e0134c4f7387de3dd0d848c7f (diff)
[fix] problem with most related that return a list in a search_default
bzr revid: nicolas.vanhoren@openerp.com-20110826140421-yt204xv30b0ef3vz
Diffstat (limited to 'addons/base/static')
-rw-r--r--addons/base/static/src/js/search.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/base/static/src/js/search.js b/addons/base/static/src/js/search.js
index 99f07784160..e3d51e2b439 100644
--- a/addons/base/static/src/js/search.js
+++ b/addons/base/static/src/js/search.js
@@ -801,6 +801,8 @@ openerp.base.search.ManyToOneField = openerp.base.search.CharField.extend({
render: function (defaults) {
if (defaults[this.attrs.name]) {
this.id = defaults[this.attrs.name];
+ if (this.id instanceof Array)
+ this.id = this.id[0];
// TODO: maybe this should not be completely removed
delete defaults[this.attrs.name];
this.dataset.name_get([this.id], $.proxy(this, 'on_name_get'));