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

how a external user can get in to odoo system with credential using API keys?

suppose user A is a customer he want to approve something in the odoo system , but he don't have credential to the odoo , then how the user can login using the API Key?

is that possible ??
i tried uisng xmlrpc but its just working in the command Prompt.

import xmlrpc.client

url = "http://localhost:8071/"
user_name = "demo@systems.com"
password = "33cedd25d3a80aeb1ba220f935353a2aa55c0fe1"
db_name = "Timesheet_new"

try:
# Common authentication check
common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(url))
uid = common.authenticate(db_name, user_name, password, {})

if uid:
# Additional checks
models = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(url))

# Try to fetch user details
user_details = models.execute_kw(
db_name, uid, password,
'res.users', 'search_read',
[[('login', '=', user_name)]],
{'fields': ['active', 'login', 'name']}
)

print("User Details:", user_details)

except Exception as e:
print("Detailed Error:", str(e))

its only working on the cmd , how make it working for the external user in to the odoo website??


الصورة الرمزية
إهمال