Odoo Help
Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM
|
e-Commerce
|
Accounting
|
Inventory
|
PoS
|
Project management
|
MRP
|
etc.
Is XMLRPC enabled on evaluation servers?
Hi,
I'm working on integration between Odoo V8 and Drupal 7 and am having a bit of trouble making a connection to my Saas at https://cool-test1.odoo.com/
I'm using the code examples available at https://www.odoo.com/documentation/8.0/api_integration.html
When I use the URL https://demo.odoo.com/start in the $info = section I get a valid response
<?php
$url = 'https://cool-test1.odoo.com';
$db = 'cool-test1';
$username = "admin";
$password = '*****';require_once('ripcord-1.1/ripcord.php');
$info = ripcord::client('https://demo.odoo.com/start')->start();
list($url, $db, $username, $password) = array($info['host'], $info['database'], $info['user'], $info['password']);$common = ripcord::client("$url/xmlrpc/common");
print_r($common->version());$uid = $common->authenticate($db, $username, $password, array());
?>
When I change $info = ripcord::client('https://demo.odoo.com/start')->start() to equal my saas server e.g. $info = ripcord::client('https://cool-test1.odoo.com/start')->start(); I get the below error:
Fatal error: Uncaught exception 'Ripcord_TransportException' with message 'Could not access https://cool-test1.odoo.com/start' in /usr/local/nginx/html/xmlrpc/ripcord-1.1/ripcord_client.php:488 Stack trace: #0 /usr/local/nginx/html/xmlrpc/ripcord-1.1/ripcord_client.php(228): Ripcord_Transport_Stream->post('https://cool-te...', '__call('start', Array) #2 /usr/local/nginx/html/xmlrpc/test.php(9): Ripcord_Client->start() #3 {main} thrown in /usr/local/nginx/html/xmlrpc/ripcord-1.1/ripcord_client.php on line 488
I have noticed that when you visit https://demo.odoo.com/start in a browser you get an XMLRPC error about the method, when you visit my Saas https://cool-test1.odoo.com/start you just get a 404.
Is there something I need to enable on my Saas somewhere? I followed the instructions here https://www.odoo.com/forum/help-1/question/is-the-xml-rpc-api-available-on-openerp-online-915 and enabled a password on my admin user which I'm using in my test code.
Any help would be much appreciated.
Thanks,
Following code is valid and working fine tested on multiple servers. but one of my live server gives me error of Could not access ###.###.###.##:8069
$url = 'https://###.###.###.##:8069';
$db = 'demo';
$username = 'user_name';
$password = 'password';
$common = ripcord::client("$url/xmlrpc/2/common");
$models = ripcord::client("$url/xmlrpc/2/object");
$common->version();
$uid = $common->authenticate($db, $username, $password, array());
Check your server settings as I found the solution from someone else.
- Domain seemed to have a poblem with the default RipcurlTransport (Stream); perhaps a problem with file system permissions. Switching to Curl solved the problem of not being able to connect to the Odoo demo database.
- The server is behind a Firewall, which needed to allow outgoing connections to port 8069. This solved the problem of not being able to connect to the production database.
It may help.
replace your URL to this https://www.odoo.com/start/xmlrpc
use your odoo account & password (when your register to odoo.com) to login.
for local URL will be like this http://localhost:8069 (without /start/xmlrpc).
you can try to use Java with this solution from this question
https://www.odoo.com/forum/help-1/question/how-to-access-odoo-8-using-java-xmlrpc-83836
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 3/9/15, 6:12 PM |
Seen: 4154 times |
Last updated: 10/27/17, 6:05 AM |