diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-01-09 15:44:05 +0000 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-01-09 15:56:53 +0000 |
| commit | 8aa8548d8ab68feb13f3bde51c557db84877e809 (patch) | |
| tree | 930790c1c84a4412db777986f6b2077808560d95 /addons/web/static/src/js/widgets/attach_document.js | |
| parent | 55a48e341580a6a400c36b6ba0d7b12ff9997f12 (diff) | |
| parent | 3e4138deaa23b3631dc3fce33cd6d1b3be28ffbd (diff) | |
[MERGE] forward port branch 12.0 up to 3e4138deaa2
closes odoo/odoo#30045
Diffstat (limited to 'addons/web/static/src/js/widgets/attach_document.js')
| -rw-r--r-- | addons/web/static/src/js/widgets/attach_document.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/widgets/attach_document.js b/addons/web/static/src/js/widgets/attach_document.js index 041b021d60b..13496f3aea7 100644 --- a/addons/web/static/src/js/widgets/attach_document.js +++ b/addons/web/static/src/js/widgets/attach_document.js @@ -11,7 +11,7 @@ var _t = core._t; var AttachDocument = Widget.extend({ template: 'AttachDocument', events: { - 'click span.o_attach_document': '_onClickAttachDocument', + 'click': '_onClickAttachDocument', 'change input.o_input_file': '_onFileChanged', }, /** @@ -76,6 +76,9 @@ var AttachDocument = Widget.extend({ * @param {Event} ev */ _onClickAttachDocument: function (ev) { + if ($(ev.target).is('input.o_input_file')) { + return; + } var fieldNames = this.getParent().canBeSaved(this.state.id); if (fieldNames.length) { return this._notifyInvalidFields(fieldNames); |
