[FIX] support many2one widget selection in tree
bzr revid: al@openerp.com-20111230164655-sfiha4rkbrqni4y0
This commit is contained in:
parent
3f8ca0c395
commit
c02f2e0fbd
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue