From 8bfc6bcb3a6c5903723ff77e0ab9c02ab2018908 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Mon, 11 Dec 2023 10:38:41 +0100 Subject: [PATCH] [FIX] website: restore page dependencies tooltip in page property See commit [1] for in-depth explanation and framework-js change but basically, `renderToElement` do not allow multiple root nodes since [2]. The fix is just about using the correct method to render multiple root nodes. Without the fix, it just crashed when you click on the page dependencies links. Step to reproduce: - Go to / - Open Page Properties - Edit / to /test - A list of possible dependencies will be shown, it's a link that can be clicked to open a tooltip to have more details - Clicking on it crash without this commit [1]: https://github.com/odoo/odoo/commit/2cff7e4094ebb4b56ab17a1462ff358b4b3e7ffd [2]: https://github.com/odoo/odoo/commit/6303a3eacdca012649a2ffda627b65c17a7217f1 closes odoo/odoo#145715 Signed-off-by: Benjamin Vray (bvr) --- .../website/static/src/components/dialog/page_properties.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/components/dialog/page_properties.js b/addons/website/static/src/components/dialog/page_properties.js index 9f26045a258..b7f7cbc25db 100644 --- a/addons/website/static/src/components/dialog/page_properties.js +++ b/addons/website/static/src/components/dialog/page_properties.js @@ -6,7 +6,7 @@ import {useService, useAutofocus} from "@web/core/utils/hooks"; import {sprintf} from "@web/core/utils/strings"; import {WebsiteDialog} from './dialog'; import {FormViewDialog} from "@web/views/view_dialogs/form_view_dialog"; -import { renderToElement } from "@web/core/utils/render"; +import { renderToFragment } from "@web/core/utils/render"; import { Component, useEffect, useState, xml, useRef } from "@odoo/owl"; export class PageDependencies extends Component { @@ -48,7 +48,7 @@ export class PageDependencies extends Component { boundary: 'viewport', placement: 'right', trigger: 'focus', - content: renderToElement("website.PageDependencies.Tooltip", { + content: renderToFragment("website.PageDependencies.Tooltip", { dependencies: this.state.dependencies, }), }).popover('toggle');