[FIX] website_blog: useless redirect on tag in sidebar

In all cases, we will fetch the record since we display the name, so it
has no extra cost to slug the record instead of the id, and it will
prevent an extra redirect from /tag/1 to /tag/name-1 on click.

opw-3752989

closes odoo/odoo#157578

X-original-commit: c406220277a3005cde34a44ba733d470769c2dc4
Signed-off-by: Jérémy Kersten <jke@odoo.com>
This commit is contained in:
Jeremy Kersten
2024-03-13 21:09:53 +00:00
parent f4c1eaf1bb
commit 6f4cb8d1c6
@@ -241,7 +241,7 @@ Display a sidebar beside the post content.
<t t-if="blog_post.tag_ids">
<div class="h5">
<t t-foreach="blog_post.tag_ids" t-as="one_tag">
<a class="badge border post_link text-decoration-none text-primary" t-attf-href="#{blog_url(tag=one_tag.id)}" t-esc="one_tag.name"/>
<a class="badge border post_link text-decoration-none text-primary" t-attf-href="#{blog_url(tag=slug(one_tag))}" t-esc="one_tag.name"/>
</t>
</div>
</t>