[IMP] website: support unslugified url for redirect#277992
Closed
fw-bot wants to merge 1 commit into
Closed
Conversation
In some cases, you want to redirect a record with ModelConverter,
whatever the slug value.
E.g. /shop/old-name-1 => /shop/alt-product-10
/shop/new-name-1 => /shop/alt-product-10
/fr/shop/nom-1 => /shop/alternatif-product-10
/de/shop/produktname-1 => /de/shop/produktname-10
In this case, adding only one redirect /shop/1 => /shop/10 covers the
need to support all the translated slugs and the old name that we
remember.
On odoo.com we have this need e.g. when we archive a Job Position, we
create a redirect, but in some cases the job position is translated or
has been renamed and we don't remember all the old urls. With this
change, we will be able to redirect all old urls, translated urls, ...
with only one redirect.
/jobs/10 -> /explore-more-opportunities-with-us
task-6391567
X-original-commit: d3bf488
Contributor
Contributor
Author
|
This PR targets saas-19.3 and is part of the forward-port chain. Further PRs will be created up to master. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
Contributor
Author
|
@JKE-be @h4818 the next pull request (#278045) is in conflict. You can merge the chain up to here by saying
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
h4818
approved these changes
Jul 23, 2026
robodoo
pushed a commit
that referenced
this pull request
Jul 23, 2026
In some cases, you want to redirect a record with ModelConverter,
whatever the slug value.
E.g. /shop/old-name-1 => /shop/alt-product-10
/shop/new-name-1 => /shop/alt-product-10
/fr/shop/nom-1 => /shop/alternatif-product-10
/de/shop/produktname-1 => /de/shop/produktname-10
In this case, adding only one redirect /shop/1 => /shop/10 covers the
need to support all the translated slugs and the old name that we
remember.
On odoo.com we have this need e.g. when we archive a Job Position, we
create a redirect, but in some cases the job position is translated or
has been renamed and we don't remember all the old urls. With this
change, we will be able to redirect all old urls, translated urls, ...
with only one redirect.
/jobs/10 -> /explore-more-opportunities-with-us
task-6391567
closes #277992
X-original-commit: d3bf488
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

In some cases, you want to redirect a record with ModelConverter, whatever the slug value.
E.g. /shop/old-name-1 => /shop/alt-product-10
/shop/new-name-1 => /shop/alt-product-10
/fr/shop/nom-1 => /shop/alternatif-product-10
/de/shop/produktname-1 => /de/shop/produktname-10
In this case, adding only one redirect /shop/1 => /shop/10 covers the need to support all the translated slugs and the old name that we remember.
On odoo.com we have this need e.g. when we archive a Job Position, we create a redirect, but in some cases the job position is translated or has been renamed and we don't remember all the old urls. With this change, we will be able to redirect all old urls, translated urls, ... with only one redirect.
/jobs/10 -> /explore-more-opportunities-with-us
task-6391567
Forward-Port-Of: #276515