diff options
| author | RomainLibert <rli@odoo.com> | 2019-04-18 14:00:28 +0000 |
|---|---|---|
| committer | RomainLibert <rli@odoo.com> | 2019-04-18 14:02:14 +0000 |
| commit | bf1e39540f53c3180eca56a5adc7b30d3334309b (patch) | |
| tree | ef3a857ab42e7080a1081f46eb6879c41e953f5b /addons/web/static/src/js/widgets/attach_document.js | |
| parent | af1841560bdcb7d5bc16f7c986f95393f630467d (diff) | |
[FIX] web: remove traceback when attaching a document
The closure overrides the arguments, which makes it impossible to
recover the attachment_ids hence sending null python code which then
breaks.
closes odoo/odoo#32810
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/widgets/attach_document.js')
| -rw-r--r-- | addons/web/static/src/js/widgets/attach_document.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/widgets/attach_document.js b/addons/web/static/src/js/widgets/attach_document.js index 3175875c151..a4a72a62765 100644 --- a/addons/web/static/src/js/widgets/attach_document.js +++ b/addons/web/static/src/js/widgets/attach_document.js @@ -109,10 +109,10 @@ var AttachDocument = Widget.extend({ */ _onFileLoaded: function () { var self = this; + // the first argument isn't a file but the jQuery.Event + var files = Array.prototype.slice.call(arguments, 1); return new Promise(function (resolve) { if (self.node.attrs.action) { - // the first argument isn't a file but the jQuery.Event - var files = Array.prototype.slice.call(arguments, 1); self._rpc({ model: self.res_model, method: self.node.attrs.action, |
