Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
3039 Vues

how to login Odoo System from PHP pge consider passed right username and password

Avatar
Ignorer
Meilleure réponse

Hi,

I think you need to use xmlrpc calls to odoo server ...

Avatar
Ignorer
Auteur

Thanks, can we call the login action method by and pass parameters from URL?

Meilleure réponse

Connexion

$user = 'admin';
$password = 'mY5up3rPwd';
$dbname = 'test';
$server_url = 'https://www.monsite.com:8069'; //connexion sécurisée$connexion = new xmlrpc_client($server_url . "/xmlrpc/common");
$connexion->setSSLVerifyPeer(0);
$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);

Now you are connected in xmlrpc to odoo as admin


Avatar
Ignorer