[FIX] binary image, use empty string when id is null
bzr revid: fme@openerp.com-20110517174246-8mhq0u0ndnza5gqw
This commit is contained in:
parent
a39f0e8358
commit
cbcefb5cbc
|
@ -1192,7 +1192,7 @@ openerp.base.form.FieldImage = openerp.base.form.Field.extend({
|
|||
set_value: function(value) {
|
||||
this._super.apply(this, arguments);
|
||||
var url = '/base/formview/image?session_id=' + this.session.session_id + '&model=' +
|
||||
this.view.dataset.model +'&id=' + this.view.datarecord.id + '&field=' + this.name
|
||||
this.view.dataset.model +'&id=' + (this.view.datarecord.id || '') + '&field=' + this.name
|
||||
this.$element.find('img').show().attr('src', url);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue