From 6f33892b0635512e14e809bd37fa66cb5f843c55 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Thu, 4 Aug 2016 16:34:04 +0200 Subject: [PATCH] [FIX] report: client action: only show edit in debug mode This option was confusing for the users. --- addons/report/static/src/js/client_action.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/report/static/src/js/client_action.js b/addons/report/static/src/js/client_action.js index 4538b9df11b..c940f03150b 100644 --- a/addons/report/static/src/js/client_action.js +++ b/addons/report/static/src/js/client_action.js @@ -108,10 +108,7 @@ var ReportAction = Widget.extend(ControlPanelMixin, { _update_control_panel_buttons: function () { this.$buttons.filter('div.o_report_edit_mode').toggle(this.in_edit_mode); this.$buttons.filter('div.o_report_no_edit_mode').toggle(! this.in_edit_mode); - this.$buttons.filter('div.o_edit_mode_available').toggle(this.edit_mode_available); - if (this.edit_mode_available) { - this.$buttons.filter('div.o_edit_mode_available').toggle(! this.in_edit_mode); - } + this.$buttons.filter('div.o_edit_mode_available').toggle(core.debug && this.edit_mode_available && ! this.in_edit_mode); }, /**