From 3aaa0bfff1b6ebedc57d15d4c1419fe93225fa41 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Mon, 8 May 2023 12:46:47 +0000 Subject: [PATCH] [FIX] web: don't override control panel display The control panel 'display' prop provided to the list controller can sometimes be falsy instead of being an object - in that case (mainly studio), the cp should not be displayed at all. The display getter did not return a structure that allowed this to behave properly. Part-of: odoo/odoo#116641 --- addons/web/static/src/views/list/list_controller.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web/static/src/views/list/list_controller.js b/addons/web/static/src/views/list/list_controller.js index ae9e226dcc8..d3196af03ec 100644 --- a/addons/web/static/src/views/list/list_controller.js +++ b/addons/web/static/src/views/list/list_controller.js @@ -377,6 +377,9 @@ export class ListController extends Component { get display() { const { controlPanel } = this.props.display; + if (!controlPanel) { + return this.props.display; + } return { ...this.props.display, controlPanel: {