From 32d5a77281b7d6f83b40a1a84acf9a4c7414fc14 Mon Sep 17 00:00:00 2001 From: Kaushal Prajappati Date: Mon, 22 Jan 2018 11:12:11 +0530 Subject: [PATCH] [FIX] website menu display --- addons/website/models/website.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/models/website.py b/addons/website/models/website.py index 4ccce166..0ada65b6 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -90,7 +90,7 @@ class Website(models.Model): def _compute_menu(self): Menu = self.env['website.menu'] for website in self: - website.menu_id = Menu.search([('parent_id', '=', False), ('website_id', '=', website.id), ('menu_view', '!=', False)], order='id', limit=1).id + website.menu_id = Menu.search([('parent_id', '=', False), ('website_id', '=', website.id)], order='id', limit=1).id # cf. Wizard hack in website_views.xml def noop(self, *args, **kwargs): @@ -675,7 +675,7 @@ class Website(models.Model): @api.multi def get_website_menus(self, website_id): - menus = request.env['website.menu'].search([('parent_id', '=', False), ('website_id', '=', website_id)]) + menus = request.env['website.menu'].search([('parent_id', '=', False), ('website_id', '=', website_id), ('menu_view', '!=', False)]) if menus: return menus