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

I have application written in PHP, and I would like to authenticate the user from PHP page and redirect to the ODOO without letting him to enter the credientials.

What I understood the /web/login route authenticate the user and set the cookie name "session_id" with the value. I made a route /login that implements authenticate method and pass the database, login  and password 


from odoo.http import request, route, Controller


class Auth(Controller):


    @route('/login', auth='none', type="json")

    def login(self, db, login, password):

        request.session.authenticate(db, login, password)


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ต.ค. 25
11536
2
ก.ค. 24
3246
1
มิ.ย. 24
5628
1
ต.ค. 23
98
413 Request Entity Too Large แก้ไขแล้ว
1
ส.ค. 23
2194