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

Fellows, at the present time, we have the typical login from Odoo.


i.sstatic.net/r2qqQdkZ.jpg


However, my company would like to use their corporate login. I was thinking about using an iFrame and the redirect to Odoo since our internal login is built in PHP and we don't have support for Python:


i.sstatic.net/zOEHTJG5.jpg


Is this possible? Or do you have any suggestions? Thanks.​


We're using the cloud edition from Odoo.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Hi André, thanks for your answer. Do you have an example or documentation? We are using the cloud one. Perhaps, I missed that part also. Thanks.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Yes, it is possible.

Odoo logins are managed on the server side, meaning you can develop a service that gets your login session from your PHP server, and using cookies, you send the session information back to Odoo to validate the user.

Then in your Odoo back office, you create a python function that validates with your PHP server if the session is valid or not, and identifies which user is trying to log in.

If the session is accepted by the PHP server, you allow the Odoo session for the specified user, which creates an Odoo session cookie, and returns it to the user's browser (this last part is the default Odoo behavior). 

There are multiple ways to implement this.
For instance, you can also create an API key for the user, and log in through the PHP, which returns the API key and connects with the Odoo server, returning a valid session.  

Notice that a session cookie is only valid when both servers are on the same domain. However, you can manipulate the cookie values on the back office, and manually set its parameters, before returning it to the user's browser.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 3 21
11362
2
thg 1 25
5671
0
thg 3 21
3204
0
thg 2 25
1033
1
thg 11 22
3130