跳至内容
菜单
此问题已终结
1 回复
8386 查看

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? 

形象
丢弃
最佳答案

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

形象
丢弃
编写者

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

相关帖文 回复 查看 活动
1
6月 18
6090
0
3月 17
4622
2
7月 24
3986
3
4月 24
4530
5
2月 24
23814