From eb43a24a2039edb27117ebf1a8538c0a286247f8 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Tue, 9 May 2023 10:24:54 +0200 Subject: [PATCH] [FIX] kpi_dashboard: Use getState function --- kpi_dashboard/static/src/js/dashboard_controller.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kpi_dashboard/static/src/js/dashboard_controller.js b/kpi_dashboard/static/src/js/dashboard_controller.js index ee8e9bc16..f13b995a0 100644 --- a/kpi_dashboard/static/src/js/dashboard_controller.js +++ b/kpi_dashboard/static/src/js/dashboard_controller.js @@ -46,12 +46,11 @@ odoo.define("kpi_dashboard.DashboardController", function (require) { }); this._super($node, options); }, - _pushState: function (state) { - // eslint-disable-next-line no-param-reassign - state = state || {}; - var env = this.model.get(this.handle, {env: true}); + getState: function () { + const state = this._super.apply(this, arguments); + const env = this.model.get(this.handle, {env: true}); state.id = env.currentId; - this._super(state); + return state; }, _addDashboard: function () { var self = this;