[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) <rde@odoo.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user