diff options
| author | Christophe Matthieu <chm@openerp.com> | 2012-12-11 11:50:45 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2012-12-11 11:50:45 +0100 |
| commit | b83c11d61a094ee0d1ebae75773f5d99dd7a25eb (patch) | |
| tree | e6da7f2f651c43de3810d6cab536863cf3c731b5 /addons/web/static/src | |
| parent | 54a4b12103620d9001235d6117c4b54af31204eb (diff) | |
[FIX] web_form: FieldMany2ManyBinaryMultiFiles get_value work with default_value and unloaded value
bzr revid: chm@openerp.com-20121211105045-0kugxoijdxh8sm7s
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 7d5585b01df..eab0b38fda1 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -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']}); |
