From c02f2e0fbd43b74b1f9cfedd59565dfbfc6bbf22 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Fri, 30 Dec 2011 17:46:55 +0100 Subject: [PATCH] [FIX] support many2one widget selection in tree bzr revid: al@openerp.com-20111230164655-sfiha4rkbrqni4y0 --- addons/web/static/src/js/formats.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js index da89073ea68..37d1e4cf7b5 100644 --- a/addons/web/static/src/js/formats.js +++ b/addons/web/static/src/js/formats.js @@ -125,6 +125,9 @@ openerp.web.format_value = function (value, descriptor, value_if_empty) { return value.format(l10n.time_format); case 'selection': // Each choice is [value, label] + if(_.isArray(value)) { + value = value[0] + } var result = _(descriptor.selection).detect(function (choice) { return choice[0] === value; });