[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
This commit is contained in:
Damien Bouvy
2023-05-12 22:59:22 +02:00
committed by Pierre Paridans
parent 7dcc42daa1
commit 3aaa0bfff1
@@ -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: {