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

I am with some APIs for my android application.

For logging I am using native odoo api     /web/session/authenticate, and from this am getting the user_id and session_id.

While moving to the next API, How can I pass this session_id to that api??

For Example:

@http.route('/asset_mgmt/create_asset', type='json', auth="user")

    def create_asset(self,**kw): 

      print('login user',request.env.user)

      try:

            if kw.get('name'):

                 asset_id = request.env['account.asset'].create({'name':kw.get('name')})



When I try to call /asset_mgmt/create_asset shows " "message": "Odoo Session Expired"

What can do?? How can I pass session_id in the above API?


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
พ.ค. 24
12781
1
เม.ย. 24
3408
0
พ.ย. 23
2073
Blank White Page After log in to Odoo13 แก้ไขแล้ว
1
ก.ย. 23
2207
2
ส.ค. 23
4637