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

Hi guys,

I use Odoo 11 and i need to call some methods declared into models of backend from website by a not logged user..

Into controller i used the paramenter auth="public" and some .sudo() into write and search....and all works great, but i have some methods called by javascript into backend that when a not logged user trigger that methods i receive this error:

/11.0/OCB/odoo/addons/base/ir/ir_http.py(90)_auth_method_user()
raise http.SessionExpiredException("Session expired")

There is something that can i do?
The backend have the sudo().write() too or sudo().search() but still get the error.... with a logged Porta user no problems, but i need to let usable from not logged users!

Thanks,
Dario


EDIT

This is the method that send me the error message from model ir.http

@classmethod
def _auth_method_user(cls):
request.uid = request.session.uid
if not request.uid:
raise http.SessionExpiredException("Session expired")


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 23
2096
0
ก.พ. 25
1319
0
ก.ย. 24
1264
0
ธ.ค. 23
1353
2
ส.ค. 22
3405