diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-03-13 15:53:55 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-03-13 15:53:55 +0100 |
| commit | 2ef43281c26b7511f4a884530ff01db876fc5ad2 (patch) | |
| tree | 0c1ce89344bfb77f222fbf0fb6cc24f2743be2a5 /addons/web | |
| parent | e88bb57a1ed6c4b5494c217c47a22b9509f8e1fb (diff) | |
| parent | 2e972578b92202eeb53c3d581965bc0095535d6d (diff) | |
[MERGE] forward port branch saas-11 up to 2e972578b92
Diffstat (limited to 'addons/web')
| -rw-r--r-- | addons/web/static/src/js/views/form_view.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views/form_view.js b/addons/web/static/src/js/views/form_view.js index 2dd5e80def4..0330c5d95cb 100644 --- a/addons/web/static/src/js/views/form_view.js +++ b/addons/web/static/src/js/views/form_view.js @@ -639,11 +639,11 @@ var FormView = View.extend(common.FieldManagerMixin, { } }, disable_button: function () { - this.$('.oe_form_buttons').add(this.$buttons).find('button').addClass('o_disabled').prop('disabled', true); + this.$('.oe_form_buttons,.o_statusbar_buttons').add(this.$buttons).find('button').addClass('o_disabled').prop('disabled', true); this.is_disabled = true; }, enable_button: function () { - this.$('.oe_form_buttons').add(this.$buttons).find('button.o_disabled').removeClass('o_disabled').prop('disabled', false); + this.$('.oe_form_buttons,.o_statusbar_buttons').add(this.$buttons).find('button.o_disabled').removeClass('o_disabled').prop('disabled', false); this.is_disabled = false; }, on_button_save: function() { @@ -658,8 +658,10 @@ var FormView = View.extend(common.FieldManagerMixin, { self.to_view_mode(); core.bus.trigger('do_reload_needaction'); core.bus.trigger('form_view_saved', self); + }).always(function() { + self.enable_button(); }); - }).always(function(){ + }).fail(function(){ self.enable_button(); }); }, |
