Download the PHP package bannerstop/odoo-connect without Composer
On this page you can find all versions of the php package bannerstop/odoo-connect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package odoo-connect
odoo-connect
PHP client library for interacting with Odoo ERP via the odoo-relay API. Provides typed DTOs, fluent query builder, and domain-specific services.
Installation
Requires PHP 8.1+.
Setup
Configuration
Timezone
Odoo stores timestamps in UTC. The Config class converts them automatically in DTOs:
Fetching Data
With DTOs (typed objects)
When you call service methods without specifying fields, you get typed DTOs:
With raw arrays (specific fields)
Pass a fields array to get raw data with only the requested fields:
Filtering
Using where()
Build filters using the fluent where() method on the RequestBuilder:
Supported operators: =, !=, <, >, <=, >=, like
Filtering for NULL values
Pass false as the value to match records where a field is NULL (unset in Odoo):
Using state() shortcut
Pagination & Ordering
All search requests support limit, offset, and order parameters, matching Odoo's query format.
Via RequestBuilder
Via Services
All service methods returning multiple records accept optional limit, offset, and order:
Defaults
| Parameter | Default | Description |
|---|---|---|
limit |
80 |
Max records returned (Odoo default) |
offset |
0 |
Records to skip |
order |
none | Sort string, e.g. "name ASC, id DESC" |
Services
OrderService
CustomerService
InvoiceService
PurchaseOrderService
TrackingCodeService
Creating Records
Via service methods
Via RequestBuilder (any model)
Updating Records
Via service methods
Via RequestBuilder (any model)
Error Handling
The library throws three exception types:
| Exception | When |
|---|---|
OdooRecordNotFoundException |
No record found for the query |
OdooApiException |
Odoo API returned a non-success response |
OdooClientException |
Network error, timeout, or max retries exceeded |
OdooRecordNotFoundException extends OdooApiException, so catching OdooApiException catches both.
Available Models
| Enum | Odoo Model | Service |
|---|---|---|
Model::SALE_ORDER |
sale.order |
OrderService |
Model::SALE_ORDER_LINE |
sale.order.line |
OrderService |
Model::ACCOUNT_MOVE |
account.move |
InvoiceService |
Model::RES_PARTNER |
res.partner |
CustomerService |
Model::PURCHASE_ORDER |
purchase.order |
PurchaseOrderService |
Model::BS_TRACKING_CODE |
bs_tracking_code |
TrackingCodeService |
All versions of odoo-connect with dependencies
guzzlehttp/guzzle Version ^7.4
spatie/guzzle-rate-limiter-middleware Version ^2.0