[FIX] web_form: FieldMany2ManyBinaryMultiFiles get_value work with default_value and unloaded value

bzr revid: chm@openerp.com-20121211105045-0kugxoijdxh8sm7s
This commit is contained in:
Christophe Matthieu 2012-12-11 11:50:45 +01:00
parent 54a4b12103
commit b83c11d61a
1 changed files with 1 additions and 1 deletions

View File

@ -5062,7 +5062,7 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
this._super( ids );
},
get_value: function() {
return _.map(this.get('value'), function (value) { return commands.link_to( value.id ); });
return _.map(this.get('value'), function (value) { return commands.link_to( isNaN(value) ? value.id : value ); });
},
get_file_url: function (attachment) {
return this.session.url('/web/binary/saveas', {model: 'ir.attachment', field: 'datas', filename_field: 'datas_fname', id: attachment['id']});