[FIX] runbot: redirect to current page after login

Because the login link redirected to `/`, when logging in the user would have
to re-navigate to their previous page unless they'd remembered this issue and
kept the original page around.

Fix this because it's annoying and dumb: we know our URL when rendering
templates, so we can redirect back there after login.

Consideration: this could also be done on logout, however it seems likely that
in that case the original page is "privileged" and when coming back we'd just
get an access error. So don't do it for now.
This commit is contained in:
xmo-odoo 2022-07-20 12:59:34 +02:00 committed by Christophe Monniez
parent 9fb7e94de9
commit 6d96f8c2cd

View File

@ -121,7 +121,7 @@
<t t-else="">
<li class="nav-item dropdown" t-ignore="true">
<b>
<a class="nav-link" t-attf-href="/web/login?redirect=/">Login</a>
<a class="nav-link" t-attf-href="/web/login?redirect={{request.httprequest.path}}">Login</a>
</b>
</li>
</t>