summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/attach_document.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-01-09 19:59:27 +0100
committerChristophe Simonis <chs@odoo.com>2019-01-09 19:59:27 +0100
commitd7c5bc02cc2b27442f0d4c8aca70266762be2a32 (patch)
tree3a675d15b539a4474be38704405b318bebecdce7 /addons/web/static/src/js/widgets/attach_document.js
parent37b518f1749aff3d6ffb2246c32f2aa1e67d9067 (diff)
parent8aa8548d8ab68feb13f3bde51c557db84877e809 (diff)
[MERGE] forward port branch saas-12.1 up to 8aa8548d8ab
Diffstat (limited to 'addons/web/static/src/js/widgets/attach_document.js')
-rw-r--r--addons/web/static/src/js/widgets/attach_document.js5
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);