summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2017-05-03 13:54:36 +0200
committerNicolas Lempereur <nle@odoo.com>2017-05-04 08:20:07 +0200
commitb9ac7090ce181705b0ffaf9c2aeeda67a9308b99 (patch)
treebb6b11e05bf0a5ac9ccffb7a4294a0edac70e22f /addons/web/static/src
parent5d6412116bd0aa58ab0c808c29a0faa1eee31ad8 (diff)
[FIX] web_kanban: double click double action
When multiple clicking fast (and with the server not too fast), we could end up with an error (eg. "Cannot read property 'controller' of null"). Something has been done previously to improve this when switching between views in: fc8a4b5e. This commit do something similar to limit multiple click on kanban records (doing it as in 26f91c429). note: master equivalent of 8f1cc2fa (which is for 10.0 up to saas-15) opw-705329 closes #16775
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/kanban/kanban_record.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/kanban/kanban_record.js b/addons/web/static/src/js/views/kanban/kanban_record.js
index e52741f65eb..5434ed7da72 100644
--- a/addons/web/static/src/js/views/kanban/kanban_record.js
+++ b/addons/web/static/src/js/views/kanban/kanban_record.js
@@ -39,6 +39,8 @@ var KanbanRecord = Widget.extend({
this.subWidgets = {};
this._setState(state);
+ // avoid quick multiple clicks
+ this._onKanbanActionClicked = _.debounce(this._onKanbanActionClicked, 300, true);
},
start: function () {
return this._super.apply(this, arguments).then(this._render.bind(this));