From bef18ef86e747dfeaf992379387aa51d438369d9 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Wed, 11 May 2022 15:21:04 +0000 Subject: [PATCH] [FIX] website: fix the /website/info page - Show the Odoo version only in debug mode to logged in user, as we do for the technical module name. The purpose of this page is to generate some backlinks and improve (does it really?) the SEO of Odoo.com. The Odoo version doesn't bring any value and is another way to easily retrieve DBs based on their version with a simple Google search. While there is many other ways to do so, let's avoid this one. - Prior to the introduction of `website.page` and the new page serve mechanism, there could be template collision when an user would create a page with the same key/name than the template of this controller. This is not the case anymore. We can remove the refresh meta tag. See [1] and [2]. - The check to see if the template exists is useless, we don't do that kind of check when rendering a controller, we just assume the view was not manually deleted by the user. I guess it was historically useful when people would not want that /website/info page to be show. But now, there is a clean way to "hide" this page by simply disabling it in the "Customize" option of the website in the navbar. [1]: https://github.com/odoo/odoo/commit/4cfd86edaa27d09f1066dd017bf466b8b30611e5 [2]: https://github.com/odoo/odoo/commit/7f6c669530ed7f9935de6516fadb7283ac00a9e4 closes odoo/odoo#91131 Signed-off-by: Romain Derie (rde) --- addons/website/controllers/main.py | 4 ---- addons/website/views/website_templates.xml | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index 045b29a7ec9..c28639011e5 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -236,10 +236,6 @@ class Website(Home): @http.route('/website/info', type='http', auth="public", website=True, sitemap=True) def website_info(self, **kwargs): - try: - request.website.get_template('website.website_info').name - except Exception as e: - return request.env['ir.http']._handle_exception(e) Module = request.env['ir.module.module'].sudo() apps = Module.search([('state', '=', 'installed'), ('application', '=', True)]) l10n = Module.search([('state', '=', 'installed'), ('name', '=like', 'l10n_%')]) diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 0818d8d1472..31cf9f31957 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -2066,12 +2066,8 @@
- - - -

- Odoo Version + Odoo Version

Information about the instance of Odoo, the Open Source ERP. @@ -2113,7 +2109,6 @@

-