Odoo Help


What command to login to OpenERP by XML-RPC from my website instead of OpenERP login page ?

on 7/1/14, 6:10 AM 2,276 views

Hi, I've been playing with XML-RPC with OpenERP. It's finally can read data from OpenERP after fighting with tons of error. It seems to be at last step in use this XML-RPC to pass through OpenERP login page ( from my imagination :) ). Is this possible with XML-RPC, what command to instruct this process ? The document only shows CRUD operation.

ThackerS (ts)
On 8/20/14, 10:31 PM

Hi GonG.
With php, firstly downloads the xmlrpc library for php PHPXML-RPC. Downloads the 2.2.2 version.
In your php file, type :

include('xmlrpc.inc'); // inclusion of the phpxml-rpc library

$user = 'admin'; //your openerp user
$password = 'demo'; // the database password
$dbname = 'demo'; // the database

$server_url = 'http://your_ip:8069'; //connexion
$connexion = new xmlrpc_client($server_url . "/xmlrpc/common");

$c_msg = new xmlrpcmsg('login');
$c_msg->addParam(new xmlrpcval($dbname, "string"));
$c_msg->addParam(new xmlrpcval($user, "string"));
$c_msg->addParam(new xmlrpcval($password, "string"));
$c_response = $connexion->send($c_msg);

if ($c_response->errno != 0){

// failed connection
    echo  '<p>error : ' . $c_response->faultString() . '</p>';
//successful connection

    $uid = $c_response->value()->scalarval();
    echo "  The user ID ( UID)  : ".$uid;



NB: If the connexion succeed, you obtain the user id (uid).
This link (http://thierry-godin.developpez.com/openerp/openerp-xmlrpc-php-fr/) can help you.
Best reagrds.


please go through https://doc.openerp.com/6.0/developer/6_22_XML-RPC_web_services/ document, might be helpful for you. 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 7/1/14, 6:10 AM
Seen: 2276 times
Last updated: 3/16/15, 8:10 AM