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

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.

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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.

الصورة الرمزية
إهمال
أفضل إجابة

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
مارس 21
11345
2
يناير 25
5656
0
مارس 21
3188
0
فبراير 25
1015
1
نوفمبر 22
3114