[16.0][ADD]website_rewrite_absolute_url: Module to add absolute url redirects #994
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.
By default Odoo doesn't allow to add absolute url redirects. I added "Is absolute url" field, if it's checked, then it will be possible to add an absolute url redirects.
In check_url_to method I replicated default behaviours, but using routing_map.bind(rewrite.url_to) if it's an absolute url.
Example: If I want to redirect my page to google.com by default Odoo add a redirect to www.mywebsite.com/google.com
With this module you can correctly redirect to google.com