I am trying to get some data from Odoo through XMLRPC, and I am working with PHP and its Ripcord library (recommended on https://www.odoo.com/documentation/8.0/api_integrati
Ok, I had not error log enabled in php.ini, so I always get nothing. If I had enabled it earlier, I would have seen that the error was that I was trying to print a kind of value I cannot print, so the problem was in the die command.
Now, it is working perfectly with this code:
$url = 'http://localhost:30080';
$db = 'db_v80_test_01';
$username = 'admin';
$password = 'adminpwd';
require_once('ripcord/ripcord.php');
$common = ripcord::client($url.'/xmlrpc/2/common');
$uid = $common->authenticate($db, $username, $password, array());
$models = ripcord::client("$url/xmlrpc/2/object");
$partners = $models->execute_kw(
$db,
$uid,
$password,
'res.partner',
'search',
array(
array(
array('is_company', '=', true),
array('customer', '=', true)
)
)
);
echo('RESULT:<br/>');
foreach ($partners as $partner) {
echo $partner.'<br/>';
}