diff --git a/addons/website/static/src/js/utils.js b/addons/website/static/src/js/utils.js index 1b44781f47c..2eaec0c490b 100644 --- a/addons/website/static/src/js/utils.js +++ b/addons/website/static/src/js/utils.js @@ -284,8 +284,9 @@ function sendRequest(route, params) { let form = document.createElement('form'); form.setAttribute('action', route); form.setAttribute('method', params.method || 'POST'); - const isInIframe = window.frameElement && window.frameElement.classList.contains('o_iframe'); - if (isInIframe) { + // This is an exception for the 404 page create page button, in backend we + // want to open the response in the top window not in the iframe. + if (params.forceTopWindow) { form.setAttribute('target', '_top'); } diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index a69c084cbbf..3c973c0a758 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -2244,7 +2244,7 @@
This page does not exist, but you can create it as you are editor of this site.
- Create Page + Create Page