Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8512 มุมมอง

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 18
6182
0
มี.ค. 17
4758
Data from website with controller แก้ไขแล้ว
2
ก.ค. 24
4086
3
เม.ย. 24
4740
5
ก.พ. 24
24005