Odoo API Web服务不返回任何内容 [英] Odoo API web service doesn't return anything

查看:98
本文介绍了Odoo API Web服务不返回任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是了解Odoo for Android API Web服务的初学者.我遵循这份文档https://www.odoo.com/documentation/8.0/api_integration.html.,所以我编写了这段代码:

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

然后,我尝试更改代码,例如此链接的第一个答案从Odoo 8 API中的方法获取值,我只是遇到此错误:

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.

推荐答案

您需要在kine下面进行更改: $ info = ripcord :: client(' https://demo.odoo.com/start ') -> start();

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

使用您的IP地址代替" https://demo.odoo.com "

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

这篇关于Odoo API Web服务不返回任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆