[FIX] binary image, use empty string when id is null

bzr revid: fme@openerp.com-20110517174246-8mhq0u0ndnza5gqw
This commit is contained in:
Fabien Meghazi 2011-05-17 19:42:46 +02:00
parent a39f0e8358
commit cbcefb5cbc
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
});