From a3fa70fd5f78cbdf5689b605784c790eb7274442 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Wed, 18 Mar 2020 11:30:46 +0000 Subject: [PATCH] [FIX] website_event: restore edit menu choice Website has a behavior that will ask you which menu you want to edit if you click on 'Edit Menu' in the topbar and there is more than one menu in the DOM. This is typically the case for the event pages where the event has its own menu on top of the website one. This event menu was not triggering that behavior since 5b563549fa6 where is was accidentally broken. closes odoo/odoo#48459 X-original-commit: 5c3c91e4a8da7b7b9f5e05f9c0ec5a6dea782d87 Signed-off-by: Quentin Smetz (qsm) Signed-off-by: Romain Derie --- addons/website/static/src/js/menu/content.js | 3 ++- addons/website_event/views/event_templates.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/js/menu/content.js b/addons/website/static/src/js/menu/content.js index 8f949441224..c568ca4b9d1 100644 --- a/addons/website/static/src/js/menu/content.js +++ b/addons/website/static/src/js/menu/content.js @@ -509,7 +509,8 @@ var SelectEditMenuDialog = weWidgets.Dialog.extend({ var self = this; self.roots = [{id: null, name: _t("Top Menu")}]; $('[data-content_menu_id]').each(function () { - self.roots.push({id: $(this).data('content_menu_id'), name: $(this).attr('name')}); + // Remove name fallback in master + self.roots.push({id: $(this).data('content_menu_id'), name: $(this).attr('name') || $(this).data('menu_name')}); }); this._super(parent, _.extend({}, { title: _t("Select a Menu"), diff --git a/addons/website_event/views/event_templates.xml b/addons/website_event/views/event_templates.xml index 71722d2b244..a63bec9d171 100644 --- a/addons/website_event/views/event_templates.xml +++ b/addons/website_event/views/event_templates.xml @@ -377,7 +377,7 @@