[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 <las@odoo.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user