PHPackages                             rcarvs/odoo-ripcord - 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. rcarvs/odoo-ripcord

ActiveLibrary

rcarvs/odoo-ripcord
===================

Rippo without XMLRPC extension dependency

05PHP

Since Sep 24Pushed 1y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Ripoo (odoo-ripcord)
====================

[](#ripoo-odoo-ripcord)

Ripoo is a PHP7 XML-RPC client handler for [Odoo](https://www.odoo.com/).

Forked from [robroypt/odoo-client](https://github.com/robroypt/odoo-client), itself using [darkaonline/ripcord](https://github.com/DarkaOnLine/Ripcord), Ripoo is a PSR-compliance edition of [ripcord](https://github.com/poef/ripcord), the library used in example in the [Odoo External API documentation for PHP](https://www.odoo.com/documentation/11.0/api_integration.html).

This library is on [GitHub](https://github.com/tbondois/odoo-ripcord) and [Packagist](https://packagist.org/packages/tbondois/odoo-ripcord).

- [Ripoo (odoo-ripcord)](#ripoo-odoo-ripcord)
    - [Supported versions](#supported-versions)
    - [Changelog](#changelog)
    - [Installation](#installation)
    - [Update](#update)
    - [Usage](#usage)
        - [xmlrpc/2/common endpoint](#xmlrpc2common-endpoint)
        - [xmlrpc/2/object endpoint](#xmlrpc2object-endpoint)
    - [How to know the model names](#how-to-know-the-model-names)
    - [License](#license)

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

[](#supported-versions)

This library should work with all versions of Odoo, at least between 8.0 and [14.0](https://www.odoo.com/documentation/14.0/developer/misc/api/odoo.html), Community &amp; Enterprise Editions. I personnaly tested it only with **11.0** but their API is the same. It can be used in all PHP frameworks, like Symfony, Laravel or Magento2. If you find any incompatibilities, please create an issue or submit a pull request.

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md)

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

[](#installation)

```
composer require tbondois/odoo-ripcord
```

Update
------

[](#update)

- To update all your libraries included in your composer.json

```
composer update
```

- But if you want to update JUST this library :

```
composer update tbondois/odoo-ripcord
```

Add ` --with-dependencies` to also update others libraries used by this one.

Usage
-----

[](#usage)

- Instantiate a new client via instance itself :

```
use Ripoo\OdooClient;

$host = 'example.odoo.com:8080';
$db = 'example-database';
$user = 'user@email.com';
$password = 'yourpassword';

$client = new OdooClient($host, $db, $user, $password);
```

- Or you can instanciate new client via ClientFactory, to centralize configuration use good Design Patterns .

Basic sample for Magento2 :

```
class RipooClientProvider
{
    private $clientFactory;
    private $client;
    private $scopeConfig;

    function __construct(
        \Ripoo\OdooClientFactory $clientFactory,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
    ) {
        $this->clientFactory = $clientFactory;
        $this->scopeConfig   = $scopeConfig;
    }

    public function createClient() : \Ripoo\OdooClient
    {
        // TODO secure injections
        $odooUrl  = $this->scopeConfig->getValue('my/settings/odoo_url');
        $odooDb   = $this->scopeConfig->getValue('my/settings/odoo_database');
        $odooUser = $this->scopeConfig->getValue('my/settings/odoo_user');
        $odooPwd  = $this->scopeConfig->getValue('my/settings/odoo_pwd');

        $this->client = $this->clientFactory->create(
            $host,
            $odooDb,
            $odooUser,
            $odooPwd
        );
        return $this->client;
    }

    public function getClient() : \Ripoo\OdooClient
    {
        // You can force nenewing a Client based on createdAt
        if (!$this->client) {
            $this->client = $this->createClient();
        }
        return $this->client;
    }
}
```

For the client to work you have to exclude the `http://` and `/xmlrpc/2` parts in the url. If you want to use another Odoo API, put it in the optional 5th parameter of constructor.

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

How to know the model names
---------------------------

[](#how-to-know-the-model-names)

- Model `ir.models` will return a list of reachable models.
- You can also use `erppeek` :

```
sudo pip install -U erppeek
erppeek  --server=http://odoo.example.com -d your_db -u admin -p password
your_db >>> models()
```

License
-------

[](#license)

MIT License. Copyright (c) 2018 Thomas Bondois. [See LICENSE file](LICENSE).

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/72cd8f228d7b2e293cee76d0fb251479333c1e1f6b0513a857e951798129c0e9?d=identicon)[renancarvs](/maintainers/renancarvs)

---

Top Contributors

[![tbd-tbd](https://avatars.githubusercontent.com/u/20397071?v=4)](https://github.com/tbd-tbd "tbd-tbd (98 commits)")[![robroypt](https://avatars.githubusercontent.com/u/19811784?v=4)](https://github.com/robroypt "robroypt (7 commits)")[![rcarvs](https://avatars.githubusercontent.com/u/10063882?v=4)](https://github.com/rcarvs "rcarvs (5 commits)")[![tbondois](https://avatars.githubusercontent.com/u/11269723?v=4)](https://github.com/tbondois "tbondois (4 commits)")[![gaelg](https://avatars.githubusercontent.com/u/445352?v=4)](https://github.com/gaelg "gaelg (1 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)")

### Embed Badge

![Health badge](/badges/rcarvs-odoo-ripcord/health.svg)

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

PHPackages © 2026

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