class Website(models.Model):
_inherit = ['website']
def child_menus(self, active_path):
website_menu = self.env['website.menu']
existing_menu = website_menu.sudo().search([('url', '=', active_path)], limit=1)
main_menu = self.env['ir.model.data'].sudo().get_object_reference('website', 'main_menu') _logger.info('------------------------') _logger.info(active_path) _logger.info(existing_menu) _logger.info(main_menu)