diff options
Diffstat (limited to 'addons/web/static/src/js/views/pivot/pivot_controller.js')
| -rw-r--r-- | addons/web/static/src/js/views/pivot/pivot_controller.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views/pivot/pivot_controller.js b/addons/web/static/src/js/views/pivot/pivot_controller.js index 2aa4cd93797..f53e0f9db7c 100644 --- a/addons/web/static/src/js/views/pivot/pivot_controller.js +++ b/addons/web/static/src/js/views/pivot/pivot_controller.js @@ -171,11 +171,13 @@ var PivotController = AbstractController.extend({ */ _update: function (state) { this._updateButtons(); - var hasNoContent = !state.measures.length || !state.has_data; + var hasNoContent = !state.has_data || !state.measures.length; if (hasNoContent) { - this.renderer.$el.detach(); - this.$el.append(QWeb.render('PivotView.nodata')); + if (!this.$('.oe_view_nocontent').length) { + this.renderer.$el.detach(); + this.$el.append(QWeb.render('PivotView.nodata')); + } } else { if (!document.contains(this.renderer.el)) { this.$('div.oe_view_nocontent').remove(); |
