From e234810faac5ffb73640bf16380142a8635cab17 Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Fri, 16 Sep 2022 09:50:37 +0000 Subject: [PATCH] [FIX] web: SettingsPage propagate NoContentHelper slot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, we propagate all the slots to the SettingsPage. This could raise an issue if the default slot (propagated) has a content, for more information see: https://github.com/odoo/owl/issues/1256 Now, to avoid this, we only propagate the slots that are used on the SettingsPage component, ie: NoContentHelper. closes odoo/odoo#100362 Signed-off-by: Géry Debongnie Co-authored-by: Lucas Perais --- .../src/webclient/settings_form_view/settings_form_compiler.js | 2 +- .../webclient/settings_form_view/settings_form_view_tests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/webclient/settings_form_view/settings_form_compiler.js b/addons/web/static/src/webclient/settings_form_view/settings_form_compiler.js index 036dd2362fa..063d9bf11ae 100644 --- a/addons/web/static/src/webclient/settings_form_view/settings_form_compiler.js +++ b/addons/web/static/src/webclient/settings_form_view/settings_form_compiler.js @@ -6,7 +6,7 @@ import { getModifier } from "@web/views/view_compiler"; function compileSettingsPage(el, params) { const settingsPage = createElement("SettingsPage"); - settingsPage.setAttribute("slots", "props.slots"); + settingsPage.setAttribute("slots", "{NoContentHelper:props.slots.NoContentHelper}"); settingsPage.setAttribute("initialTab", "props.initialApp"); settingsPage.setAttribute("t-slot-scope", "settings"); diff --git a/addons/web/static/tests/webclient/settings_form_view/settings_form_view_tests.js b/addons/web/static/tests/webclient/settings_form_view/settings_form_view_tests.js index c0d69232e3b..760b8319505 100644 --- a/addons/web/static/tests/webclient/settings_form_view/settings_form_view_tests.js +++ b/addons/web/static/tests/webclient/settings_form_view/settings_form_view_tests.js @@ -1424,7 +1424,7 @@ QUnit.module("SettingsFormView", (hooks) => { const expectedCompiled = `
- +