Odoo API web service doesn't return anything

蓝咒 提交于 2019-12-24 06:34:45

问题


I am beginner for knowing API web service in Odoo for Android. I follow this documentation https://www.odoo.com/documentation/8.0/api_integration.html., so I make this code:

<?php
require_once('ripcord-master/ripcord.php');

$url = "http://100.100.1.148:8069"; //local IP
$db = "UAT_DISTRICT";
$username = "openpg";
$password = "serving";
$info = ripcord::client('https://demo.odoo.com/start')->start();
$common = ripcord::client("$url/xmlrpc/2/common");
$common->version();

//Authenticate the credentials
$uid = $common->authenticate($db, $username, $password, array());
echo $uid; //this echo doesn't show anything, it should be 1 or 0

Then I try to change code like the first answer of this link Get values from method in Odoo 8 API, I just get this error:

Array ( [faultCode] => 1 [faultString] => Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 8.0-20150723\server\.\openerp\service\wsgi_server.py", line 75, in xmlrpc_return File "C:\Program Files (x86)\Odoo 8.0-20150723\server\.\openerp\http.py", line 115, in dispatch_rpc File "C:\Program Files (x86)\Odoo 8.0-20150723\server\.\openerp\service\model.py", line 34, in dispatch File "C:\Program Files (x86)\Odoo 8.0-20150723\server\.\openerp\service\security.py", line 37, in check File "C:\Program Files (x86)\Odoo 8.0-20150723\server\openerp\addons\base\res\res_users.py", line 502, in check File "C:\Program Files (x86)\Odoo 8.0-20150723\server\.\openerp\api.py", line 241, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20150723\server\openerp\addons\auth_crypt\auth_crypt.py", line 50, in check_credentials File "C:\Program Files (x86)\Odoo 8.0-20150723\server\.\openerp\sql_db.py", line 158, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20150723\server\.\openerp\sql_db.py", line 234, in execute ProgrammingError: operator does not exist: integer = boolean LINE 1: ...T password, password_crypt FROM res_users WHERE id=false AND... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. )

then I googling from some site also, but I get nothing so far. Anyone can make my problem clear? Or there is better documentation/example for that, I will really appreciate.


回答1:


You need to change below kine : $info = ripcord::client('https://demo.odoo.com/start')->start();

Use your IP address instead of "https://demo.odoo.com"



来源:https://stackoverflow.com/questions/37961422/odoo-api-web-service-doesnt-return-anything

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!