Repository
OCA/website · module folder · Try on Runboat
Module version
1.0.0
Category
Website
Folder size
0.6 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
https://tecnativa.com/
Last tracking update
2026-08-07 07:17:49
Authors
Odoo Community Association (OCA), Tecnativa, LasLabs
Maintainers
Odoo Community Association (OCA), Tecnativa, LasLabs
Committers
Pedro M. Baeza, GitHub, Jairo Llopis, Weblate, OCA Transbot, Dave Lasley, oca-travis
Odoo dependencies
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
None
Description

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
assets_editor assets_editor ir.ui.view qweb Inherits website.assets_editor
assets_frontend_demo assets_frontend_demo ir.ui.view qweb Inherits website.assets_frontend
sample_page sample_page ir.ui.view qweb New
website_seo_redirection_form_view Website SEO Redirection Form website.seo.redirection form New
website_seo_redirection_search_view Website SEO Redirection Search website.seo.redirection search New
website_seo_redirection_tree_view Website SEO Redirection Tree website.seo.redirection tree New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (3)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • enumerate_pages(self, query_string=None)
    @api.multi
    Show redirected URLs in search results.

New fields (3)
  • destination Char
    help='Path where the controller will be found now.' index=True required=True string='Destination URL'
  • origin Char
    help='Path where the original controller was found.' index=True required=True string='Original URL'
  • relocate_controller Boolean
    default=True help='If you relocate the controller, the same page that was found in the original URL will be now in the destination. Otherwise, this will simply make requests be redirected, but a new controller should be available in the destination URL if you do not want a 404 error.'
Public methods (3)
  • find_origin(self, redirected_path=None)
    @api.model
    Finds the original path for :param:`redirected_path`. :param str redirected_path: Destination path to get to a controller. :raise NoOriginError: When no original URL is found, or the found URL is not marked with :attr:`relocate_controller`. :return str: Returns the original path (e.g. ``/page/example``) if :attr:`redirected_path` (e.g. ``/example``) is found among the SEO redirections, or :attr:`redirected_path` itself otherwise.
  • redirect_auto(self, path=None, code=301, website=None, rerouting=None)
    @api.model
    Return a redirection for the SEO path or fail. :param str path: Path that will be searched among the SEO redirections. :param int code: HTTP redirection code. :param website odoo.models.Model: Current website object. Default: ``request.website``. :param list rerouting: List of reroutings performed. It defaults to ``request.rerouting``. :raise NoRedirectionError: If no redirection target is found. This allows you to continue the normal behavior in your controller. :return werkzeug.wrappers.Response: Redirection to the SEO version of the URL.
  • smart_add(self, origin, destination)
    @api.model
    Add or update redirection only if needed. :param str origin: The original URL. :param str destination: The new redirected URL.

Loading…

Loading…