PHPackages                             robroypt/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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. robroypt/odoo-client

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

robroypt/odoo-client
====================

A PHP Client for Odoo using Ripcord RPC library (as used in Odoo Web API docs)

v1.0beta(9y ago)2149.4k↓27.4%37[5 issues](https://github.com/robroypt/odoo-client/issues)MITPHPPHP &gt;=5.3.0

Since Mar 22Pushed 7y ago2 watchersCompare

[ Source](https://github.com/robroypt/odoo-client)[ Packagist](https://packagist.org/packages/robroypt/odoo-client)[ Docs](https://github.com/robroypt/odooclient)[ RSS](/packages/robroypt-odoo-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

OdooClient
==========

[](#odooclient)

OdooClient is an [Odoo](https://www.odoo.com/) client for PHP. It is inspired on [OpenERP API](https://bitbucket.org/simbigo/openerp-api) from simbigo and [OdooClient](https://github.com/jacobsteringa/OdooClient) from jacobsteringa and uses a more or less similar API.

However, instead of its own XML-RPC client or the Zend XML-RPC libraries it uses the [Ripcord](https://github.com/poef/ripcord) RPC library [as implemented by DarkaOnline](https://github.com/DarkaOnLine/Ripcord) -- this is the library used in the [Odoo Web Service API documentation](https://www.odoo.com/documentation/9.0/api_integration.html).

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

[](#supported-versions)

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

Usage
-----

[](#usage)

Instantiate a new client.

```
use OdooClient\Client;
........
$url = 'example.odoo.com/xmlrpc/2';
$database = 'example-database';
$user = 'user@email.com';
$password = 'yourpassword';

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

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

### xmlrpc/2/common endpoint

[](#xmlrpc2common-endpoint)

Getting version information.

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

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],
];
$offset = 0;
$limit = 10;

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

Search and count records.

```
$criteria = [
  ['customer', '=', true],
];

$client->search_count('res.partner', $criteria);
```

Reading records.

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

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

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

Search and Read records.

```
$criteria = [
  ['customer', '=', true],
];

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

$customers = $client->search_read('res.partner', $criteria, $fields, 10);
```

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);
```

License
=======

[](#license)

MIT License. Copyright (c) 2017 Rob Roy.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% 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

Unknown

Total

1

Last Release

3345d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f7f740236815b523be299d3112f880aeecac519e16f0dc46fb90fe9cc7f6b13?d=identicon)[robroypt](/maintainers/robroypt)

---

Top Contributors

[![robroypt](https://avatars.githubusercontent.com/u/19811784?v=4)](https://github.com/robroypt "robroypt (7 commits)")[![mermetbt](https://avatars.githubusercontent.com/u/711667?v=4)](https://github.com/mermetbt "mermetbt (1 commits)")[![ThomasNucleus](https://avatars.githubusercontent.com/u/25164792?v=4)](https://github.com/ThomasNucleus "ThomasNucleus (1 commits)")

---

Tags

xmlrpcodooxmlrpc

### Embed Badge

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

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[sabre/xml

sabre/xml is an XML library that you may not hate.

52832.2M131](/packages/sabre-xml)[darkaonline/ripcord

RPC client and server around PHP's xmlrpc library

35897.7k9](/packages/darkaonline-ripcord)

PHPackages © 2026

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