From 3c17d2ef3b7fde689e33dfd01811b02afb56a6f1 Mon Sep 17 00:00:00 2001 From: aath-odoo Date: Wed, 31 Jan 2024 11:58:22 +0000 Subject: [PATCH] [FIX] website_event: submenu page not found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit: When disabling the submenu for events, it would show a 404 Page Not Found error. After this commit: the current behavior is that when the submenu is disabled, it redirects to the /register page of the event. task-3658380 closes odoo/odoo#160544 X-original-commit: ea140d5cfea992caad7207ff6499a46a8f575729 Signed-off-by: Warnon Aurélien (awa) Signed-off-by: Aashish Thakur (aath) --- addons/website_event/static/src/snippets/options.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_event/static/src/snippets/options.js b/addons/website_event/static/src/snippets/options.js index 2f6fb9039c8..383f813b12e 100644 --- a/addons/website_event/static/src/snippets/options.js +++ b/addons/website_event/static/src/snippets/options.js @@ -17,9 +17,10 @@ options.registry.WebsiteEvent = options.Class.extend({ this.eventId = this._getEventObjectId(); // Only need for one RPC request as the option will be destroyed if a // change is made. - const rpcData = await this.orm.read("event.event", [this.eventId], ["website_menu"]); + const rpcData = await this.orm.read("event.event", [this.eventId], ["website_menu","website_url"]); this.data.reload = this.currentWebsiteUrl; this.websiteMenu = rpcData[0]['website_menu']; + this.data.reload = rpcData[0]['website_url']; return res; },