[FIX] get_value called on readonly reference widget before its name_get has had the time to run
lp bug: https://launchpad.net/bugs/919225 fixed bzr revid: xmo@openerp.com-20120120153046-fkq105mmzooo58q5
This commit is contained in:
parent
86b15b7e9d
commit
48459b568a
|
@ -198,7 +198,14 @@ openerp.web.page = function (openerp) {
|
|||
if (!this.value) {
|
||||
return null;
|
||||
}
|
||||
return _.str.sprintf('%s,%d', this.field.relation, this.value[0]);
|
||||
var id;
|
||||
if (typeof this.value === 'number') {
|
||||
// name_get has not run yet
|
||||
id = this.value;
|
||||
} else {
|
||||
id = this.value[0];
|
||||
}
|
||||
return _.str.sprintf('%s,%d', this.field.relation, id);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue