Get values ​​from a method in Odoo 8 API

I am trying to interact with the Odoo 8 API and get a list of fields. This method is called by the ripcord XMLRPC library, and this sentence:

$models = ripcord::client($url.'/xmlrpc/2/object');
        $models->execute_kw($dbname, $username, $password,'res.partner', 'fields_get', array(), array('attributes' => array('string', 'help', 'type')));

But I do not know how to get the values ​​of the answers ...

+4
source share
2 answers

I found some useful documents that are related to the ODOO web service API in different languages ​​like Python, PHP, Ruby and Java,

Please click on the link below, which is useful for your solution.

ODOO Web Service API Reference

I hope this will be useful for you .. :)

0
source

I made my comments, I kindly ask you to find it below, this can help in your case.

: , .

ODOO fields_get, , .

, list of all the field res.partner.

ODOO fields_get .

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

$url = "http://localhost:8059";           //ODOO  Server Url
$db ="ripcord_test_db";                   //Database Name
$username = "prakasharmacs24@gmail.com";  //UserName 
$password = "7959884833";                 //Password
$common = ripcord::client("$url/xmlrpc/2/common");

//Authenticate the credentials
$uid = $common->authenticate($db, $username, $password, array());
echo $uid;  //1

//Create Model Instance 
$models = ripcord::client("$url/xmlrpc/2/object");

// Fetch the data by calling appropriate methods
$partner_field = array();
$partner_field=$models->execute_kw($db, $uid, $password,
                           'res.partner', 'fields_get',array(),
                            array('attributes' => array('string', 'help', 'type')));

//print_r($partner_field);

. , print_r($partner_field);

, .

, .

:

function getfieldtype($field){

    return $field['type'];
}
print_r(array_map("getfieldtype",$partner_field));

, .

0

All Articles