From 2c1096da952bd76a8fe8eb8ec05ff48dd8edbb0c Mon Sep 17 00:00:00 2001 From: "Adrien Minne (adrm)" Date: Tue, 2 May 2023 14:05:14 +0000 Subject: [PATCH] [IMP] web,spreadsheet_dashboard: add missing props validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes odoo/odoo#120323 Task: 3297417 Related: odoo/enterprise#40611 Signed-off-by: Lucas Lefèvre (lul) --- .../mrp/static/src/components/mo_overview/mrp_mo_overview.js | 5 +---- .../static/src/bundle/dashboard_action/dashboard_action.js | 2 ++ addons/web/static/src/webclient/actions/action_service.js | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/mrp/static/src/components/mo_overview/mrp_mo_overview.js b/addons/mrp/static/src/components/mo_overview/mrp_mo_overview.js index 6fa89dea526..ce66e70e6ad 100644 --- a/addons/mrp/static/src/components/mo_overview/mrp_mo_overview.js +++ b/addons/mrp/static/src/components/mo_overview/mrp_mo_overview.js @@ -147,9 +147,6 @@ MoOverview.components = { MoOverviewDisplayFilter, MoOverviewComponentsBlock, }; -MoOverview.props = { - ...standardActionServiceProps, - globalState: { type: Object, optional: true }, // Appears when coming back from the breadcrumb -}; +MoOverview.props = {...standardActionServiceProps }; registry.category("actions").add("mrp_mo_overview", MoOverview); diff --git a/addons/spreadsheet_dashboard/static/src/bundle/dashboard_action/dashboard_action.js b/addons/spreadsheet_dashboard/static/src/bundle/dashboard_action/dashboard_action.js index b08ea24dbb1..cdccf0f7e43 100644 --- a/addons/spreadsheet_dashboard/static/src/bundle/dashboard_action/dashboard_action.js +++ b/addons/spreadsheet_dashboard/static/src/bundle/dashboard_action/dashboard_action.js @@ -10,6 +10,7 @@ import { MobileFigureContainer } from "./mobile_figure_container/mobile_figure_c import { FilterValue } from "@spreadsheet/global_filters/components/filter_value/filter_value"; import { loadSpreadsheetDependencies } from "@spreadsheet/helpers/helpers"; import { useService } from "@web/core/utils/hooks"; +import { standardActionServiceProps } from "@web/webclient/actions/action_service"; import { Component, onWillStart, useState, useEffect } from "@odoo/owl"; @@ -144,6 +145,7 @@ SpreadsheetDashboardAction.components = { DashboardMobileSearchPanel, MobileFigureContainer, }; +SpreadsheetDashboardAction.props = { ...standardActionServiceProps }; registry .category("actions") diff --git a/addons/web/static/src/webclient/actions/action_service.js b/addons/web/static/src/webclient/actions/action_service.js index 81634a11774..e9353615472 100644 --- a/addons/web/static/src/webclient/actions/action_service.js +++ b/addons/web/static/src/webclient/actions/action_service.js @@ -62,6 +62,8 @@ export const standardActionServiceProps = { action: Object, // prop added by _getActionInfo actionId: { type: Number, optional: true }, // prop added by _getActionInfo className: String, // prop added by the ActionContainer + globalState: { type: Object, optional: true }, // prop added by _updateUI + state: { type: Object, optional: true }, // prop added by _updateUI }; function parseActiveIds(ids) {