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

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?


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
4
مايو 24
12802
1
أبريل 24
3429
0
نوفمبر 23
2077
1
سبتمبر 23
2222
2
أغسطس 23
4648