تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
8547 أدوات العرض

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
يونيو 18
6213
0
مارس 17
4801
2
يوليو 24
4114
3
أبريل 24
4792
5
فبراير 24
24059