summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/attach_document.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-01-04 14:54:08 +0100
committerChristophe Simonis <chs@odoo.com>2019-01-04 14:54:08 +0100
commitec9400821ecf45d9495740ebcea9e213ef12d3fe (patch)
tree93a7753a321f05fe5fcd88b67e5e29034f5107e7 /addons/web/static/src/js/widgets/attach_document.js
parent2cdc1cc9ced4364cac403fd0891836dba52bdd08 (diff)
parent27a084eb814acd81679db1e461c53389d6afc875 (diff)
[MERGE] forward port branch saas-11.3 up to 27a084eb814
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);