跳至內容
選單
此問題已被標幟
3 回覆
3033 瀏覽次數

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

頭像
捨棄
最佳答案

Hi,

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

頭像
捨棄
作者

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

最佳答案

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


頭像
捨棄