OpenERP Json query

Installs: 1 443

Dependents: 1

Stars: 8

Watchers: 5

Forks: 18

Open Issues: 3

0.0.2 2014-01-28 08:44 UTC


Latest Stable Version Total Downloads Latest Unstable Version License

Modest PHP class to manage OpenERP Json query.

Code maturity

Early working alpha. Comments welcome. Although it was tested against OpenERP version 6.1 and 7.0.


  • Simple way to add new json-rpc entry points
  • Quite easy to get started (see Usage section)
  • Ability to resume an open session (and thus login in openerp) with a saved session_id and HTTP cookie_id (without $login and $password)


sample PHP code:


require_once 'openerp.php';

$oe = new PhpOeJson\OpenERP("http://localhost:8069", "test_json");
$oe->login("admin", "xxxxxx");

echo "Logged in (session id: " . $oe->session_id . ")";

$partners = $oe->read(array(
  'model' => 'res.partner',
  'fields' => array('name', 'city'),

echo "<ul>";
foreach($partners['records'] as $partner) {
   echo "    <li>" . $partner["name"] . " - " . $partner["city"] . "</li>\n";
echo "</ul>";


This actual code (with small modifications) is provided in the example-project directory which is a composer-ready package (more about composer, how to get composer command). This means you can run composer install on the root of the example-project directory to install dependencies, and you'll only have to edit settings.php and set $url, $db and the $login, $password to test it with your installation.

Please note that this is a very thin layer above Tivoka which is a JSON-RPC PHP lib.