Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
24921 Переглядів

I have a website with an eCommerce webstore. Users are able to register to the website, but after logging in they are directed to 'localhost:5010/web?'. Because regular users have no access rights to this page they get an internal server error.

Instead they should be redirected to 'localhost:5010'. Where can I change this?

Аватар
Відмінити
Найкраща відповідь

Go through these steps:

  1. Locate Menu User Interface/Views [Setting->Technical->User Interface->Views]

  2. Search Login 

  3. Edit this template  change the values of redirect form t-att-value="redirect" to "/"

  4.  <input type="hidden" name="redirect" value="/"/>

<?xml version="1.0"?> <t name="Login" t-name="web.login"> <t t-call="web.login_layout"> <form class="oe_login_form" role="form" t-attf-action="/web/login{{ '?debug' if debug else '' }}" method="post" onsubmit="this.action = this.action + location.hash"> <t t-call="web.database_select"/> <div class="form-group field-login"> <label for="login" class="control-label">Email </label>

<input type="text" name="login" t-att-value="login" id="login" class="form-control" required="required" autofocus="autofocus"/> </div> <div class="form-group field-password"> <label for="password" class="control-label">Password</label> <input type="password" name="password" id="password" class="form-control" required="required" t-att-autofocus="'autofocus' if login else None"/> </div> <p class="alert alert-danger" t-if="error"> <t t-esc="error"/> </p> <p class="alert alert-success" t-if="message"> <t t-esc="message"/> </p> <input type="hidden" name="redirect" value="/"/> <div class="clearfix oe_login_buttons"> <button type="submit" class="btn btn-primary">Log in</button> </div> </form> </t> </t>

Аватар
Відмінити
Автор

Thanks, this worked!

Related Posts Відповіді Переглядів Дія
0
квіт. 25
1089
1
трав. 24
3747
1
квіт. 24
2440
0
квіт. 24
1783
1
трав. 23
4816