summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAdrien Dieudonne <adr@odoo.com>2017-07-28 14:07:39 +0200
committerAdrien Dieudonne <adr@odoo.com>2017-07-31 13:49:42 +0200
commita1f7aa3362eded33f7142e218e74acad98367511 (patch)
tree05fb77e5748b132da3644edb6db7c6abc5a229af /addons/web/static/src
parentb76109173a8ddb2fbfe9cca29b759ec86fdc0f75 (diff)
[FIX] web: form_renderer: disable buttons on clicking status bar
This fix reproduces a behavior implemented in saas-15. It avoids simultaneous actions when you quickly click on status bar buttons. For example, in a manufacturing order, the main_flow_tour clicks on 'check availability' and 'produce'. Clicking on 'check availability' triggers an act_window_close action when it has done. Clicking on produce opens a dialog. Both action are executed simultaneously. It may happen that the act_window_close closes the dialog opened by action 'produce', which makes the test fail. Now the following buttons are disabled if you click on a status bar button: - action buttons in control panel - action buttons in status bar - stat buttons in button box
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/form/form_renderer.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/web/static/src/js/views/form/form_renderer.js b/addons/web/static/src/js/views/form/form_renderer.js
index 75d3fcebf1d..2ef0f077e09 100644
--- a/addons/web/static/src/js/views/form/form_renderer.js
+++ b/addons/web/static/src/js/views/form/form_renderer.js
@@ -114,18 +114,20 @@ var FormRenderer = BasicRenderer.extend({
});
},
/**
- * Disable stat buttons so that they can't be clicked anymore
+ * Disable statusbar buttons and stat buttons so that they can't be clicked anymore
*
*/
disableButtons: function() {
- this.$('.oe_button_box button').attr('disabled', true);
+ this.$('.o_statusbar_buttons button, .oe_button_box button')
+ .attr('disabled', true);
},
/**
- * Enable stat buttons so they can be clicked again
+ * Enable statusbar buttons and stat buttons so they can be clicked again
*
*/
enableButtons: function() {
- this.$('.oe_button_box button').removeAttr('disabled');
+ this.$('.o_statusbar_buttons button, .oe_button_box button')
+ .removeAttr('disabled');
},
/**
* returns the active tab pages for each notebook