From bd665c1d5b11b42b0c26e83bb3ac0ccd2dd53f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Hennecart=20=28jeh=29?= Date: Fri, 23 Sep 2022 10:17:36 +0000 Subject: [PATCH] [FIX] website: add the search params intro the editedObjectPath In some place the search params are mandatory in the route. We now add the search and hash params to the editedObjectPath to avoid having an error when trying to go back. task-2993826 closes odoo/odoo#101996 X-original-commit: 2bed20392084bcbec2683939e5659b03e3ea7acf Signed-off-by: Romain Derie (rde) --- addons/website/static/src/systray_items/edit_in_backend.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website/static/src/systray_items/edit_in_backend.js b/addons/website/static/src/systray_items/edit_in_backend.js index dacf0161001..93408c89730 100644 --- a/addons/website/static/src/systray_items/edit_in_backend.js +++ b/addons/website/static/src/systray_items/edit_in_backend.js @@ -23,7 +23,8 @@ export class EditInBackendSystray extends Component { editInBackend() { const { metadata: { mainObject } } = this.websiteService.currentWebsite; - this.websiteService.editedObjectPath = this.websiteService.contentWindow.location.pathname; + const location = this.websiteService.contentWindow.location; + this.websiteService.editedObjectPath = location.pathname + location.search + location.hash; this.actionService.doAction({ res_model: mainObject.model, res_id: mainObject.id,