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

Hi,

I started to use ODOO Online version (in trial mode) and I would like to use the API with XMLRPC but I can't connect to it.

I use a xmlrpc client with Node.js

var clientOptions = { host: this.url , port: this.port , path: '/xmlrpc/2/common' }

var client = xmlrpc.createClient(clientOptions);
var params = [];
params.push(this.db);
params.push(this.username);
params.push(this.password);
params.push('');
client.methodCall('authenticate', params, function(error, value) {
     if(error){

        return callback(error, null);
    }

    uid = value;
    return callback(null);
});

I tried port 8069 but I got a ECONNREFUSED

I tried ports 80 and 443 but it return HTML

I followed the instruction (http://www.odoo.com/documentation/9.0/api_integration.html) and changed my user password.


Thanks

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

You have to replace 'authenticate' by 'login'.

client.methodCall('login', [value.database, value.user, value.password],
function (error, value) {

});
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
نوفمبر 19
6749
0
نوفمبر 16
5198
1
أبريل 16
4234
0
فبراير 16
3779
0
نوفمبر 15
3383