From 998dc0bbe23bf4b1582e0cbae43d121a03dafa6b Mon Sep 17 00:00:00 2001 From: Benoit Socias Date: Thu, 24 Mar 2022 13:00:15 +0000 Subject: [PATCH] [FIX] website: avoid traceback during edition of menu missing URL Before this commit if a menu had been saved without URL, a string + boolean concatenation error could happen when updating the menu. After this commit the False boolean is replaced by an empty string to avoid the problem. task-2781260 closes odoo/odoo#89147 X-original-commit: 0288e0e91a071c7ec4b8adb0474d82a46dea9c9c Signed-off-by: Romain Derie (rde) --- addons/website/models/website_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/models/website_menu.py b/addons/website/models/website_menu.py index 857f6c31685..07869c79a94 100644 --- a/addons/website/models/website_menu.py +++ b/addons/website/models/website_menu.py @@ -184,7 +184,7 @@ class Menu(models.Model): menu_id = self.browse(menu['id']) # if the url match a website.page, set the m2o relation # except if the menu url is '#', meaning it will be used as a menu container, most likely for a dropdown - if menu['url'] == '#': + if not menu['url'] or menu['url'] == '#': if menu_id.page_id: menu_id.page_id = None else: