Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2830 Visualizzazioni

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?


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
4
mag 24
12796
1
apr 24
3422
0
nov 23
2076
1
set 23
2214
2
ago 23
4642