Download the PHP package obuchmann/laravel-odoo-api without Composer

On this page you can find all versions of the php package obuchmann/laravel-odoo-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-odoo-api

Laravel Odoo Api

This is a medium level API to Odoo (former OpenERP) XMLRPC-API for Laravel. Odoo website

This package is a successor of Laradoo, but there is no backwards compatibility!

:warning: This Package is not Maintained any more. Successor is Odoo Jsonrpc

Compatibility

Laravel 7 and higher

Odoo 8.0 and higher

Php 7.4 and higher

Installation

This package is installed via Composer. To install, run the following command.

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

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.

You can also add the Alias facade.

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

Instance the main Odoo class:

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

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

Connect and log into the ERP:

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.

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

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

You always can check the permission on a specific model:

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

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

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

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

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

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

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:

The method returns the id of the new record.

For Deleting records we have the delete method:

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

You can also remove records by ids like follows:

Update any record of your Odoo:

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

Custom api Calls are also supported


All versions of laravel-odoo-api with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
illuminate/support Version ~7|~8
darkaonline/ripcord Version ^0.1.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package obuchmann/laravel-odoo-api contains the following files

Loading the files please wait ....