Download the PHP package codebar-ag/laravel-odoo without Composer

On this page you can find all versions of the php package codebar-ag/laravel-odoo. 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

Latest Version on Packagist Total Downloads GitHub-Tests GitHub Code Style PHPStan Dependency Review

This package was developed to give you a quick start to communicate with the Odoo external API from Laravel. It wraps the most common endpoints — sessions, users, employees, projects, tasks and timesheets — behind a clean, typed connector built on Saloon.

⚠️ This package is not designed as a replacement of the official Odoo external API. See the Odoo documentation if you need further functionality. ⚠️

📑 Table of Contents

💡 What is Odoo?

Odoo is an open-source suite of business applications covering CRM, sales, project management, timesheets, accounting, inventory and more. It exposes an external API that lets you read and write records across all of these modules. This package provides a typed, Laravel-friendly client for the most common Odoo endpoints used in day-to-day integrations.

🛠 Requirements

Package PHP Laravel
v1.0.0 ^8.4 ^13.0

⚙️ Installation

You can install the package via composer:

🔧 Configuration

Optionally publish the config file to adjust defaults:

You can generate an API key in your Odoo user profile under Preferences → API Keys.

Environment Variables

Add the following variables to your .env file:

🚀 Basic Usage

Create an OdooConnector instance with your Odoo URL, API key, and optionally a database name:

Each method returns a typed response object with dedicated methods for accessing the data.

Using the Facade

If you set the environment variables above (or publish and edit the config file), the package binds a pre-configured OdooConnector in the container, so you can resolve it or use the Odoo facade instead of constructing it by hand:

The facade reads url, api_key, db, timeout, and max_redirects from config/laravel-odoo.php (configurable via their respective LARAVEL_ODOO_* env vars). Direct instantiation with new OdooConnector(...) remains fully supported — for example when you need to talk to more than one Odoo instance.

📖 API Reference

Session

User

Employees

Fields

Permissions

Projects

Tasks

Timesheets

Bank Accounts

CRUD and search operations for the res.partner.bank model.

Odoo 19.0 vs 19.3: Odoo renamed the bank-account fields in 19.3 (acc_numberaccount_number, acc_holder_nameholder_name, and the bank_id / currency_id relations were dropped). The connector detects the server version once (cached) and transparently uses the right field names for reads and writes, so the API below is the same on both. Read DTOs always expose the classic property names (accNumber, accHolderName, …). To skip the version lookup, force it with $connector->withBankAccountSchema(modern: true).

Sync All

Fetch projects, all tasks, and all timesheet entries in one call:

📦 DTOs

Read DTOs are built on spatie/laravel-data. Odoo's relation tuples ([id, name]) are flattened onto paired properties (e.g. projectId / projectName) and its false-means-empty sentinel is normalised to null. Each DTO keeps a fromArray() factory for backwards compatibility and is also a full laravel-data Data object (from(), collect(), …).

DTO Description
ProjectDto Represents an Odoo project
TaskDto Represents an Odoo task
TimesheetEntryDto Represents a timesheet entry (read)
CreateTimesheetDto Payload for creating a timesheet entry
UpdateTimesheetDto Payload for updating a timesheet entry
EmployeeDto Represents an Odoo employee
UserDto Represents the authenticated Odoo user
FieldDto Represents a field definition on an Odoo model

🧪 Testing

For live integration tests against a real Odoo instance, copy phpunit.xml.dist to phpunit.xml, fill in the LARAVEL_ODOO_URL, LARAVEL_ODOO_API_KEY and LARAVEL_ODOO_DB env values, then run:

📝 Changelog

Please see CHANGELOG for more information on what has changed recently.

✏️ Contributing

Please see CONTRIBUTING for details.

🧑‍💻 Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

🙏 Credits

🎭 License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-odoo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/contracts Version ^13.0
saloonphp/laravel-plugin Version ^4.0
saloonphp/saloon Version ^4.0
spatie/laravel-data Version ^4.23
spatie/laravel-package-tools Version ^1.16
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 codebar-ag/laravel-odoo contains the following files

Loading the files please wait ...