PHPackages                             leblanc-simon/openerpbyjsonrpc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. leblanc-simon/openerpbyjsonrpc

ActiveLibrary[API Development](/categories/api)

leblanc-simon/openerpbyjsonrpc
==============================

Library to communicate into PHP and OpenERP (Odoo)

2.1.0(4y ago)24374[1 issues](https://github.com/leblanc-simon/openerpbyjsonrpc/issues)MITPHPPHP ^7.3 || ~8.0.0 || ~8.1.0CI failing

Since Jul 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/leblanc-simon/openerpbyjsonrpc)[ Packagist](https://packagist.org/packages/leblanc-simon/openerpbyjsonrpc)[ RSS](/packages/leblanc-simon-openerpbyjsonrpc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (7)Used By (0)

OpenErpByJsonRpc
================

[](#openerpbyjsonrpc)

Communicate with Odoo via JSON-RPC

[![SymfonyInsight](https://camo.githubusercontent.com/dada8a33d0f9395e27dbef4c377ee1733640ef4aad610075df41bbe999301c4a/68747470733a2f2f696e73696768742e73796d666f6e792e636f6d2f70726f6a656374732f32336530356431642d663432632d343430632d396538382d3331373634393161356339332f736d616c6c2e737667)](https://insight.symfony.com/projects/23e05d1d-f42c-440c-9e88-3176491a5c93)

Installation
------------

[](#installation)

```
composer require leblanc-simon/openerpbyjsonrpc
```

Usage
-----

[](#usage)

```
use OpenErpByJsonRpc\JsonRpc\ZendJsonRpc;
use OpenErpByJsonRpc\JsonRpc\OpenERP;
use OpenErpByJsonRpc\Storage\FileStorage;
use OpenErpByJsonRpc\Client\Session;
use OpenErpByJsonRpc\Client\Database;
use OpenErpByJsonRpc\Client\Model;
use OpenErpByJsonRpc\Criteria;

$jsonrpc = new ZendJsonRpc('http://odoo.com');
$odoo = new OpenERP($jsonrpc, new FileStorage([
    'directory' => 'path/to/cache',
    'prefix' => 'session_',
]));

$odoo
    ->setBaseUri('http://odoo.com')
    ->setPort(null)
    ->setUsername('admin')
    ->setPassword('admin')
    ->setDatabase('main')
    ->reconnectOrLogin(null)
;

// If you use FileStorage, you can reconnect without username and password
// $session_id can be retrieve via Session::getInfos()
$odoo->reconnectOrLogin($session_id);

///////////////////////////////
// Model methods
//
$model = new Model($odoo);

// Read a single record
$model->readOne('res.users', 1, ['id', 'login']);

// Search records
// * use array for criteria
$model->search('res.users', [['login', '=', 'admin']], ['id', 'login']);

// * use Criteria class : search login = admin AND name = admin
$criteria = new Criteria();
$criteria
    ->equal('login', 'admin')
    ->equal('name', 'admin')
;
$model->search('res.users', $criteria, ['id', 'login']);

// Create record
$id = $model->create('res.partner', [
    'name' => 'Jean Dupont',
    'function' => 'DRH',
    'phone' => '+330120304050',
]);

// Update record
$model->create('res.partner', $id, [
    'name' => 'Jean Dupond',
]);

// Delete record
$model->create('res.partner', $id);

///////////////////////////////
// Session methods
//
$session = new Session($odoo);

// Get the session informations
$session->getInfos();

// Get the availables languages
$session->getLangList();

// Get the availables modules
$session->getModules();

// Change your current password
$session->changePassword('admin', 'new pass');

///////////////////////////////
// Database methods
//
$database = new Database($odoo);

// Get the list of available database
$database->getList();

// Create a new database
$database->create(
    'master password', // your master password in your odoo config file
    'database_name',
    false, // true if you want add demo data
    'fr_FR',
    'admin' // the admin password for the created database
);

// Duplicate a database
$database->duplicate(
    'master password', // your master password in your odoo config file
    'database_to_duplicate',
    'new_database'
);

// Drop a database
$database->drop(
    'master password', // your master password in your odoo config file
    'database_name'
);
```

License
-------

[](#license)

[MIT](http://opensource.org/licenses/MIT)

Author
------

[](#author)

Simon Leblanc

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~788 days

Total

4

Last Release

1588d ago

Major Versions

v0.0.9 → v1.0.02015-11-21

v1.0.0 → 2.0.02020-10-15

PHP version history (2 changes)2.0.0PHP &gt;=7.3

2.1.0PHP ^7.3 || ~8.0.0 || ~8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fc78f90d0b6d0192015d2262e2d8349c17a46b28c23f0f8ea9f0399ebf8d038?d=identicon)[leblanc-simon](/maintainers/leblanc-simon)

---

Top Contributors

[![leblanc-simon](https://avatars.githubusercontent.com/u/605746?v=4)](https://github.com/leblanc-simon "leblanc-simon (13 commits)")

---

Tags

jsonrpcOpenERPodoo

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/leblanc-simon-openerpbyjsonrpc/health.svg)

```
[![Health](https://phpackages.com/badges/leblanc-simon-openerpbyjsonrpc/health.svg)](https://phpackages.com/packages/leblanc-simon-openerpbyjsonrpc)
```

###  Alternatives

[edujugon/laradoo

Odoo ERP API for Laravel

16468.6k](/packages/edujugon-laradoo)[sergeyfast/eazy-jsonrpc

PHP JSON-RPC 2.0 Server/Client Implementation with SMD &amp; Swagger support

6164.2k](/packages/sergeyfast-eazy-jsonrpc)[drlecks/simple-web3-php

Web3 library in PHP

7641.6k2](/packages/drlecks-simple-web3-php)[tbondois/odoo-ripcord

Ripoo : a PHP8 XML-RPC client handler for Odoo External API

16124.3k1](/packages/tbondois-odoo-ripcord)[tochka-developers/jsonrpc

JsonRpc extension for Laravel

2733.8k1](/packages/tochka-developers-jsonrpc)[alazzi-az/odoo-xmlrpc

PHP package that provides a simple and easy-to-use interface for interacting with the Odoo XML-RPC API

2816.6k1](/packages/alazzi-az-odoo-xmlrpc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
