[FIX] website: possibility to set no url for the home menu
Unsetting the URL of the menu `Home`, in Settings > Configuration > Website Settings > Configure Website, leaded to the unavailability of the website. opw-657572
This commit is contained in:
parent
5c0fd9780e
commit
b459c4dc03
|
@ -40,9 +40,9 @@ class Website(openerp.addons.web.controllers.main.Home):
|
|||
else:
|
||||
first_menu = main_menu.child_id and main_menu.child_id[0]
|
||||
if first_menu:
|
||||
if not (first_menu.url.startswith(('/page/', '/?', '/#')) or (first_menu.url=='/')):
|
||||
if first_menu.url and (not (first_menu.url.startswith(('/page/', '/?', '/#')) or (first_menu.url == '/'))):
|
||||
return request.redirect(first_menu.url)
|
||||
if first_menu.url.startswith('/page/'):
|
||||
if first_menu.url and first_menu.url.startswith('/page/'):
|
||||
return request.registry['ir.http'].reroute(first_menu.url)
|
||||
return self.page(page)
|
||||
|
||||
|
|
Loading…
Reference in New Issue