Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
8461 Lượt xem

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? 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 18
6152
0
thg 3 17
4700
2
thg 7 24
4049
3
thg 4 24
4672
5
thg 2 24
23929