diff --git a/addons/web/static/src/js/views/pivot/pivot_renderer.js b/addons/web/static/src/js/views/pivot/pivot_renderer.js index 8335c7c29f5..95681d8f1c7 100644 --- a/addons/web/static/src/js/views/pivot/pivot_renderer.js +++ b/addons/web/static/src/js/views/pivot/pivot_renderer.js @@ -4,6 +4,8 @@ odoo.define('web.PivotRenderer', function (require) { const OwlAbstractRenderer = require('web.AbstractRendererOwl'); const field_utils = require('web.field_utils'); const patchMixin = require('web.patchMixin'); + const core = require('web.core'); + const _t = core._t; const { useExternalListener, useState, onMounted, onPatched } = owl.hooks; @@ -50,6 +52,9 @@ odoo.define('web.PivotRenderer', function (require) { if (!this.env.device.isMobile) { useExternalListener(window, 'click', this._resetState); } + if (!props.hasData || !props.measures.length) { + this.description = _t("Try to add some records, or make sure that there is at least one measure and no active filter in the search bar."); + } } //---------------------------------------------------------------------- diff --git a/addons/web/static/src/xml/pivot.xml b/addons/web/static/src/xml/pivot.xml index 0b16af71f0c..1864052f0be 100644 --- a/addons/web/static/src/xml/pivot.xml +++ b/addons/web/static/src/xml/pivot.xml @@ -2,11 +2,7 @@
- - - Try to add some records, or make sure that there is at least one measure and no active filter in the search bar - - +