From da77c8fe45bc00974f59352b21257f9d49be013a Mon Sep 17 00:00:00 2001 From: "Habib (ayh)" Date: Thu, 15 Jun 2023 14:33:07 +0000 Subject: [PATCH] [FIX] web: redirectWarningDialog does not markup noContentHelp HTML The bank recon custom view relies on the noContentHelper. (When there are no records, a custom noContentHelper is displayed including buttons to clear filters) When the view is activated from a RedirectWarning, the action's help text is not marked up therefore displaying raw html in the UI. With this fix, the actions help key is marked up (very similar to the doActionButton) To reproduce: - On a DB with demo data - Accounting -> Actions -> Lock Dates - Set a lock date for all users (after the last unreconciled date, ensure there are no unposted moved before this date) - You will be presented with a Redirect Warning Dialog - Click Show Unreconiled Bank Statement Lines - If there are lines, use the filter to search for "SomethingThatWontReturnRecords" - You will see raw html Task-3366470 closes odoo/odoo#125493 X-original-commit: 0086841addfc5b0e3293d205bdfe8dde67b32ce4 Related: odoo/enterprise#42740 Signed-off-by: Laurent Smet --- addons/web/static/src/core/errors/error_dialogs.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/core/errors/error_dialogs.js b/addons/web/static/src/core/errors/error_dialogs.js index 6c16f4b326e..c9208355b2f 100644 --- a/addons/web/static/src/core/errors/error_dialogs.js +++ b/addons/web/static/src/core/errors/error_dialogs.js @@ -7,7 +7,7 @@ import { registry } from "../registry"; import { useService } from "@web/core/utils/hooks"; import { capitalize } from "../utils/strings"; -import { Component, useState } from "@odoo/owl"; +import { Component, useState, markup } from "@odoo/owl"; // This props are added by the error handler export const standardErrorDialogProps = { @@ -156,6 +156,9 @@ export class RedirectWarningDialog extends Component { if (this.additionalContext) { options.additionalContext = this.additionalContext; } + if (this.actionId.help) { + this.actionId.help = markup(this.actionId.help); + } await this.actionService.doAction(this.actionId, options); this.props.close(); }