Website SEO Redirection

website_seo_redirection
REPOSITORY
REPOSITORYOCA/website
GIT
GIThttps://github.com/OCA/website.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/website/tree/10.0/website_seo_redirection
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYWebsite
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), LasLabs
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), LasLabs
COMMITTERS
COMMITTERSPedro M. Baeza, GitHub, Jairo Llopis, OCA Transbot, Dave Lasley, oca-travis, Weblate
WEBSITE
WEBSITEhttps://tecnativa.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:20:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - website
    - web
    - base
    - web_editor
    - web_planner
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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
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.
REPOSITORY
REPOSITORYOCA/website
GIT
GIThttps://github.com/OCA/website.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/website/tree/9.0/website_seo_redirection
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYWebsite
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), LasLabs
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), LasLabs
COMMITTERS
COMMITTERSPedro M. Baeza, Jairo Llopis, OCA Transbot, oca-travis, Weblate
WEBSITE
WEBSITEhttps://tecnativa.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:24
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - website
    - web
    - base
    - web_editor
    - web_planner
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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
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 openerp.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.
REPOSITORY
REPOSITORYOCA/website
GIT
GIThttps://github.com/OCA/website.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/website/tree/8.0/website_seo_redirection
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYWebsite
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, Jairo Llopis, Stéphane Bidoul (ACSONE), OCA Transbot, oca-travis, Weblate
WEBSITE
WEBSITEhttps://tecnativa.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:27
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - website
    - web
    - base
    - share
    - mail
    - base_setup
    - web_kanban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
assets_editor assets_editor ir.ui.view qweb Inherits website.assets_editor
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
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 openerp.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.