summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views
diff options
context:
space:
mode:
authorHardik Prajapati <hpr@odoo.com>2020-04-21 11:25:07 +0000
committerYannick Tivisse <yti@odoo.com>2020-04-29 07:08:15 +0000
commitc2d5a4beaf7c73e51d9a45993dda0fc84627d086 (patch)
tree4485ef673c115815e32ceadc9920f0c99bfeb656 /addons/web/static/src/js/views
parentb2f87c7c8ec9b5f484e0d2daa9f3427bf659fce6 (diff)
[FIX] web: pivot view nocontenthelp message
Since the commit https://github.com/odoo/odoo/commit/46cf65d68e9c13193dff4b563b9b0bbb2199dfc1 when help is not defined in action then nocontenthelp is displayed as [object, object] due to the desciption passed from renderder of the pivot view. So in this commit while calling the NoContentHelper pass the descitption as string instead of jquery element. we can use the t-value in template but that string will create issue for transalation so pass the desctiption from the pivot render. closes odoo/odoo#50347 Taskid: 2240167 Closes: #49859 X-original-commit: c7cc672aba669175280d619ad39b14daefd7733f Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views')
-rw-r--r--addons/web/static/src/js/views/pivot/pivot_renderer.js5
1 files changed, 5 insertions, 0 deletions
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.");
+ }
}
//----------------------------------------------------------------------