PHPackages                             rbonnal-beclood/odoo-client - 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. rbonnal-beclood/odoo-client

ActiveLibrary[API Development](/categories/api)

rbonnal-beclood/odoo-client
===========================

A PHP Client for Odoo, forked from jacobsteringa/odoo-client

0.3.3(8y ago)052MITPHP

Since Jul 3Pushed 8y agoCompare

[ Source](https://github.com/rbonnal-beclood/OdooClient)[ Packagist](https://packagist.org/packages/rbonnal-beclood/odoo-client)[ Docs](https://github.com/rbonnal-beclood/OdooClient)[ RSS](/packages/rbonnal-beclood-odoo-client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (12)Used By (0)

OdooClient
==========

[](#odooclient)

OdooClient is an Odoo client for PHP. It is inspired on [OpenERP API](https://bitbucket.org/simbigo/openerp-api) from simbigo and uses a more or less similar API. Instead of an own XML-RPC client it depends on the XML-RPC and XML libraries from ZF.

Supported versions
------------------

[](#supported-versions)

This library should work with Odoo 8 and 9. If you find any any incompatibilities, please create an issue or submit a pull request.

**Known issues**

- The `Odoo::getReport()` method in v0.2.2 and lower does not work with Odoo 9.

Usage
-----

[](#usage)

Instantiate a new client.

```
use Jsg\Odoo\Odoo;

$url = 'example.odoo.com/xmlrpc/2';
$database = 'example-database';
$user = 'user@email.com';
$password = 'yourpassword';

$client = new Odoo($url, $database, $user, $password);
```

For the client to work you have to include the `/xmlrpc/2` part of the url.

When you need to tweak the HTTP client used by the XML-RPC client, you can inject a custom HTTP client via the constructor or the `Odoo::setHttpClient` method.

```
use Jsg\Odoo\Odoo;
use Zend\Http\Client as HttpClient;

$httpClient = new HttpClient(null, [
    'sslverifypeer' => false,
]);

// constructor argument
$client = new Odoo($url, $database, $user, $password, $httpClient);

// or setter
$client = new Odoo($url, $database, $user, $password);
$client->setHttpClient($httpClient);
```

### xmlrpc/2/common endpoint

[](#xmlrpc2common-endpoint)

Getting version information.

```
$client->version();
```

Getting timezone information.

```
$client->timezone();
```

There is no login/authenticate method. The client does authentication for you, that is why the credentials are passed as constructor arguments.

### xmlrpc/2/object endpoint

[](#xmlrpc2object-endpoint)

Search for records.

```
$criteria = [
  ['customer', '=', true],
];
$limit = 10;
$offset = 0;

$client->search('res.partner', $criteria, $offset, $limit);
```

Reading records.

```
$ids = $client->search('res.partner', [['customer', '=', true]], 0, 10);

$fields = ['name', 'email', 'customer'];

$customers = $client->read('res.partner', $ids, $fields);
```

Creating records.

```
$data = [
  'name' => 'John Doe',
  'email' => 'foo@bar.com',
];

$id = $client->create('res.partner', $data);
```

Updating records.

```
// change email address of user with current email address foo@bar.com
$ids = $client->search('res.partner', [['email', '=', 'foo@bar.com']], 0, 1);

$client->write('res.partner', $ids, ['email' => 'baz@quux.com']);

// 'uncustomer' the first 10 customers
$ids = $client->search('res.partner', [['customer', '=', true]], 0, 10);

$client->write('res.partner', $ids, ['customer' => false]);
```

Deleting records.

```
$ids = $client->search('res.partner', [['email', '=', 'baz@quuz.com']], 0, 1);

$client->unlink('res.partner', $ids);
```

Get report in base64 format.

```
$ids = $client->search('res.partner', [['customer', '=', true]], 0, 10);

$report = $client->getReport('res.partner', $ids);
```

License
=======

[](#license)

MIT License. Copyright (c) 2014 Jacob Steringa.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 69.6% 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 ~144 days

Recently: every ~177 days

Total

10

Last Release

3029d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cde1a33f9a408abd6ad946a863f1efb6a2f62e38bd076c31cfedd0d151b48c10?d=identicon)[rbonnal-beclood](/maintainers/rbonnal-beclood)

---

Top Contributors

[![romain-bonnal](https://avatars.githubusercontent.com/u/23381409?v=4)](https://github.com/romain-bonnal "romain-bonnal (16 commits)")[![coreation](https://avatars.githubusercontent.com/u/361244?v=4)](https://github.com/coreation "coreation (5 commits)")[![basz](https://avatars.githubusercontent.com/u/143068?v=4)](https://github.com/basz "basz (2 commits)")

### Embed Badge

![Health badge](/badges/rbonnal-beclood-odoo-client/health.svg)

```
[![Health](https://phpackages.com/badges/rbonnal-beclood-odoo-client/health.svg)](https://phpackages.com/packages/rbonnal-beclood-odoo-client)
```

###  Alternatives

[jacobsteringa/odoo-client

A PHP Client for Odoo

1324.1k](/packages/jacobsteringa-odoo-client)[narno/gandi-api

Simple PHP library for the Gandi API.

1622.3k](/packages/narno-gandi-api)[zfr/zfr-prerender

Integration with prerender.io service

218.0k](/packages/zfr-zfr-prerender)[fourmation/rest-remote-object

This library provide a REST adapter for the Remote Object pattern implemented by the ProxyManager project.

175.6k1](/packages/fourmation-rest-remote-object)

PHPackages © 2026

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