Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3596 Lượt xem

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)


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 24
2863
1
thg 6 24
5310
1
thg 10 23
11049
1
thg 10 23
98
1
thg 8 23
2194