Skip to Content
Menu
This question has been flagged
3 Replies
2843 Views

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

Avatar
Discard
Best Answer

Hi,

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

Avatar
Discard
Author

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

Best Answer

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
Discard