edujugon/laradoo
Larablocks Analysis
edujugon/laradoo works with Laravel 5 to 8 (latest release 3.1.0, Sep 27, 2020), all past end of life (the last on Jan 24, 2023): no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5 to 8, past end of life since Jan 24, 2023
- No release in the last 12 months (last: Sep 27, 2020)
- 135 downloads a month (needs 10,000)
- 163 GitHub stars (at least 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Sep 27, 2020.
- No releases in the last 12 months.
- First released: May 17, 2017.
- Monthly downloads: 135, up 67% from six months ago.
- 28 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.
| Install | |
|---|---|
composer require edujugon/laradoo |
|
| Latest Version: | 3.1.0 |
| PHP: | ^5.6||^7.0 |
| Laravel: | 5 – 8 |
| License: | MIT |
| Last Updated: | Oct 31, 2023 |
| Links: | GitHub · Packagist |
Laradoo
Odoo ERP API for Laravel. Odoo website
Compatibility
| Laravel version | PHP version | Package version |
|---|---|---|
| ^5.1 | ^5.6 | ^V2.0 |
| ^5.1 | ^5.5 | ^V1.1 |
Installation
type in console:
composer require edujugon/laradoo
Register Laradoo service by adding it to the providers array.
'providers' => array(
...
Edujugon\Laradoo\Providers\OdooServiceProvider::class
)
Let's add the Alias facade, add it to the aliases array.
'aliases' => array(
...
'Odoo' => Edujugon\Laradoo\Facades\Odoo::class,
)
Publish the package's configuration file to the application's own config directory
php artisan vendor:publish --provider="Edujugon\Laradoo\Providers\OdooServiceProvider" --tag="config"
Configuration
After publishing the package config file, the base configuration for laradoo package is located in config/laradoo.php
Also, you can dynamically update those values calling the available setter methods:
host($url), username($username), password($password), db($name), apiSuffix($name)
Usage samples
Instance the main Odoo class:
$odoo = new \Edujugon\Laradoo\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 laradoo.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')
->db('my-db')
->host('https://my-host.com')
->connect();
// Note:
hostshould 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->where('customer', '=', true)
->search('res.partner');
You can limit the amount of data using limit method and use as many as condition you need:
$ids = $odoo->where('is_company', true)
->where('customer', '=', true)
->limit(3)
->search('res.partner');
If need to get a list of models, use the get method:
$models = $odoo->where('customer', true)
->limit(3)
->get('res.partner');
Instead of retrieving all properties of the models, you can reduce it by adding fields method before the method get
$models = $odoo->where('customer', true)
->limit(3)
->fields('name')
->get('res.partner');
If not sure about what fields a model has, you can retrieve the model structure data by calling fieldsOf method:
$structure = $odoo->fieldsOf('res.partner');
Till now we have only retrieved data from the ERP but you can also Create and Delete records.
In order to create a new record just call create method as follows:
$id = $odoo->create('res.partner',['name' => 'Jonh Odoo']);
The method returns the id of the new record.
For Deleting records we have the delete method:
$result = $odoo->where('name', 'Jonh Odoo')
->delete('res.partner');
Notice that before calling
deletemethod you have to usewhere.
You can also remove records by ids like follows:
$result = $odoo->deleteById('res.partner',$ids);
Update any record of your ERP:
$updated = $odoo->where('name', 'John Odoo')
->update('res.partner',['name' => 'John Odoo Odoo','email' => 'Johndoe@odoo.com']);
Notice that all delete and update methods always returns true except if there was an error.
call method is also available for those who want to set a custom API call:
$odoo->call('res.partner', 'search',[
[
['is_company', '=', true],
['customer', '=', true]
]
],[
'offset'=>1,
'limit'=>5
]);
Full API list
Related Packages
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.1.0 | ^5.6|| | ^5.1|| | MIT | |
| 3.0.0 | ^5.6|| | ^5.1|| | MIT | |
| 2.2.0 | ^5.6|| | ^5.1|| | MIT | |
| 2.1.0 | ^5.6|| | ^5.1|| | MIT | |
| 2.0.0 | ^5.6|| | ^5.1|| | MIT | |
| 1.1.2 | ^5.1 | MIT | ||
| 1.1.1 | ^5.1 | MIT | ||
| 1.1.0 | ^7.0 | ^5.1 | MIT | |
| 1.0.9 | ^7.0 | ^5.1 | MIT | |
| 1.0.8 | ^7.0 | ^5.1 | MIT | |
| 1.0.7 | ^7.0 | ^5.1 | MIT | |
| 1.0.6 | ^7.0 | ^5.1 | MIT | |
| 1.0.5 | ^7.0 | ^5.1 | MIT | |
| 1.0.4 | ^7.0 | ^5.1 | MIT | |
| 1.0.3 | ^7.0 | ^5.1 | MIT | |
| 1.0.2 | ^7.0 | ^5.1 | MIT | |
| 1.0.1 | ^7.0 | ^5.1 | MIT | |
| 1.0.0 | ^7.0 | ^5.1 | MIT |