Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
8550 Widoki

Is there a way to reload a website rather than get the 400: Bad Request message? I think that the error is being thrown by the decorator function @http.route, because I have auth='public'. And I need it public, so please no auth='none' answers. 

On my website is a form with an input field and submit button. I want that when user clicks submit and if the session expires it redirects him to the same site before the POST submit.

Can this be done? 

Awatar
Odrzuć
Najlepsza odpowiedź

odoo's authentication is bind with Http layer so not possible to avoid session expired error.
so alternate is covert route http to json and odoo provide jquery form plugin to convert form post http to json 
ref: https://github.com/odoo/odoo/blob/12.0/addons/web/static/lib/jquery.form/jquery.form.js#L2

Awatar
Odrzuć
Autor

yeah... I thought so. will try to do it with ajax and jquery.

Powiązane posty Odpowiedzi Widoki Czynność
1
cze 18
6214
0
mar 17
4803
2
lip 24
4117
3
kwi 24
4794
5
lut 24
24064