PHPackages                             obuchmann/laravel-odoo-api - 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. obuchmann/laravel-odoo-api

ActiveLibrary[API Development](/categories/api)

obuchmann/laravel-odoo-api
==========================

Laravel connector for Odoo

v0.5-beta(5y ago)85.5k↓50%5MITPHPPHP ^7.4|^8.0

Since Jan 29Pushed 3y agoCompare

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

READMEChangelog (6)DependenciesVersions (7)Used By (0)

Laravel Odoo Api
================

[](#laravel-odoo-api)

This is a medium level API to Odoo (former OpenERP) XMLRPC-API for Laravel. [Odoo website](https://www.odoo.com)

This package is a successor of [Laradoo](https://github.com/Edujugon/laradoo), but there is no backwards compatibility!

⚠️ **This Package is not Maintained any more. Successor is [Odoo Jsonrpc](https://packagist.org/packages/obuchmann/odoo-jsonrpc)**

Compatibility
-------------

[](#compatibility)

Laravel 7 and higher

Odoo 8.0 and higher

Php 7.4 and higher

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

[](#installation)

This package is installed via [Composer](https://getcomposer.org/). To install, run the following command.

```
composer require obuchmann/laravel-odoo-api

```

Publish the package's configuration file to the application's own config directory

```
php artisan vendor:publish --provider="Obuchmann\LaravelOdooApi\Providers\OdooServiceProvider" --tag="config"
```

This package supports autodiscover.

If you don't use autodiscover for reasons, you can add the provider as described below.

Register Laravel Odoo Api service by adding it to the providers array.

```
'providers' => array(
        ...
        Obuchmann\LaravelOdooApi\Providers\OdooServiceProvider::class
    )
```

You can also add the Alias facade.

```
'aliases' => array(
        ...
        'Odoo' => Obuchmann\LaravelOdooApi\Facades\Odoo::class,
    )
```

### Configuration

[](#configuration)

After publishing the package config file, the base configuration for laravel-odoo-api package is located in config/laravel-odoo-api.php

Also, you can dynamically update those values calling the available setter methods:

`host($url)`, `username($username)`, `password($password)`, `database($name)`, `apiSuffix($name)`

Usage samples
-------------

[](#usage-samples)

Instance the main Odoo class:

```
$odoo = new \Obuchmann\LaravelOdooApi\Odoo();
```

You can get the Odoo API version just calling the version method:

```
$version = $odoo->version();
```

> This methods doesn't require to be connected/Logged into the ERP.

Connect and log into the ERP:

```
$odoo = $odoo->connect();
```

All needed configuration data is taken from `laravel-odoo-api.php` config file. But you always may pass new values on the fly if required.

```
$this->odoo = $this->odoo
            ->username('my-user-name')
            ->password('my-password')
            ->database('my-db')
            ->host('https://my-host.com')
            ->connect();
```

> // Note: `host` should contain 'http://' or 'https://'

After login, you can check the user identifier like follows:

```
$userId = $this->odoo->getUid();
```

You always can check the permission on a specific model:

```
$can = $odoo->can('read', 'res.partner');
```

> Permissions which can be checked: 'read','write','create','unlink'

Method `search provides a collection of ids based on your conditions:

```
$ids = $odoo
    ->model('res.partner')
    ->where('customer', '=', true)
    ->search();
```

You can limit the amount of data using `limit` method and use as many as condition you need:

```
$ids = $odoo
    ->model('res.partner')
    ->where('is_company', true)
    ->where('customer', '=', true)
    ->limit(3)
    ->search();
```

If need to get a list of models, use the `get` method:

```
$models = $odoo
    ->model('res.partner')
    ->where('customer', true)
    ->limit(3)
    ->get();
```

Instead of retrieving all properties of the models, you can reduce it by adding `fields` method before the method `get`

```
$models = $odoo
    ->model('res.partner')
    ->where('customer', true)
    ->limit(3)
    ->fields(['name'])
    ->get();
```

If not sure about what fields a model has, you can retrieve the model structure data by calling `fieldsOf` method:

```
$structure = $odoo
    ->model('res.partner')
    ->listModelFields();
```

Till now we have only retrieved data from Odoo but you can also Create and Delete records.

In order to create a new record just call `create` method as follows:

```
$id = $odoo
    ->model('res.partner')
    ->create(['name' => 'Bobby Brown']);
```

> The method returns the id of the new record.

For Deleting records we have the `delete` method:

```
$result = $odoo
    ->model('res.partner')
    ->where('name', '=', 'Bobby Brown')
    ->delete();
```

> Notice that before calling `delete` method you have to use `where`.

You can also remove records by ids like follows:

```
$result = $odoo
    ->model('res.partner')
    ->deleteById($ids);
```

Update any record of your Odoo:

```
$updateSuccessfull = $odoo
    ->model('res.partner')
    ->where('name', '=', 'Bobby Brown')
    ->update(['name' => 'Dagobert Duck','email' => 'daduck@odoo.com']);
```

Notice that all `delete` and `update` methods always returns `true` except if there was an error.

Custom api Calls are also supported

```
$ids = $odoo
    ->model('res.partner')
    ->setMethod('search')
    ->setArguments([[
        ['is_company', '=', true]
    ]])
    ->setOption('limit', 3)
    ->addResponseClass(Odoo\Response\ListResponse::class)
    ->get();
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

Every ~4 days

Total

6

Last Release

1906d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83928edc2d003cd4111054a2726f6169e9fee92cf5a4cba0016e968fadeb18c8?d=identicon)[obuchmann](/maintainers/obuchmann)

---

Top Contributors

[![Edujugon](https://avatars.githubusercontent.com/u/4853751?v=4)](https://github.com/Edujugon "Edujugon (66 commits)")[![obuchmann](https://avatars.githubusercontent.com/u/3889302?v=4)](https://github.com/obuchmann "obuchmann (28 commits)")[![Okipa](https://avatars.githubusercontent.com/u/5328934?v=4)](https://github.com/Okipa "Okipa (1 commits)")[![raakesh](https://avatars.githubusercontent.com/u/2386374?v=4)](https://github.com/raakesh "raakesh (1 commits)")

---

Tags

laravelpackageodoo

### Embed Badge

![Health badge](/badges/obuchmann-laravel-odoo-api/health.svg)

```
[![Health](https://phpackages.com/badges/obuchmann-laravel-odoo-api/health.svg)](https://phpackages.com/packages/obuchmann-laravel-odoo-api)
```

###  Alternatives

[edujugon/laradoo

Odoo ERP API for Laravel

16468.6k](/packages/edujugon-laradoo)[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[gregoriohc/laravel-trello

A Laravel wrapper and facade package for the Trello API

3366.8k2](/packages/gregoriohc-laravel-trello)[nikolag/laravel-square

Square API integration with Laravel built on nikolag/core

3827.3k](/packages/nikolag-laravel-square)[hernandev/hipchat-laravel

HipChat PHP Client Wrapper for Laravel 4 and 5

2733.2k](/packages/hernandev-hipchat-laravel)[vinelab/api-manager

Laravel API Manager Package - beatify and unify your responses with the least effort possible.

392.1k](/packages/vinelab-api-manager)

PHPackages © 2026

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