Download the PHP package artaza/module-odoo-integration without Composer

On this page you can find all versions of the php package artaza/module-odoo-integration. 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 module-odoo-integration

Artaza_OdooIntegration

Magento 2 endpoints for the Magento 2 Connector for Odoo 19.

Odoo talks to Magento over the native REST API for almost everything it syncs — stock, prices, orders, invoices, shipments, coupons. This module adds the two endpoints Magento Open Source does not provide, so Odoo can finish the loop:

Endpoint What it does
POST /V1/products/tax-class Assigns a product tax class to a batch of SKUs
POST /V1/orders/{orderId}/negotiation Stores an order's negotiated total and the reason, for display

Both are authenticated with the access token of a Magento integration and guarded by their own ACL resources, so you grant exactly these two and nothing else.

How it fits together

The ERP owns the numbers; Magento stores and displays them. Nothing here calls out — this module only ever answers.

The tax-class endpoint, step by step

The order of the checks is the point: the class is validated before anything is written, and SKUs Magento does not know are reported back instead of failing the whole batch silently.

updateAttributes is the native mass-update path: one query for the whole batch, and nothing else about the product is rewritten — no full save, no unrelated reindex.

The negotiation endpoint

Writing with saveAttribute instead of OrderRepository::save is deliberate: a full save would fire the order's observers and recalculations. The agreed figure is display only — the document that carries fiscal weight is the one the ERP issues.


Install

Grant the ACL

System ▸ Extensions ▸ Integrations ▸ your integration ▸ API, then tick:

The tax-class endpoint also needs the native Magento_Tax::manage_tax, because the caller reads taxClasses / taxRules / taxRates to work out which class charges which rate.

⚠️ After adding an ACL resource you must reauthorize the integration, or its calls keep coming back 401 with the old token's permissions.

⚠️ This module changes one store-wide setting

Since Magento 2.4.4, an integration's access token cannot be used as a Bearer token on the REST API unless "Allow OAuth Access Tokens to be used as standalone Bearer tokens" is on — it defaults to off. Without it, every server-to-server call answers "The consumer isn't authorized to access %resources" even when the integration has been granted everything.

Because that is exactly how an ERP authenticates, this module ships etc/config.xml turning the flag on by default:

Know what that means: it is a store-wide default that re-enables the pre-2.4.4 behaviour for every integration token in the installation, not only this one. It is what makes the module work out of the box, and it is a decision you should make consciously. If your security policy forbids it, delete etc/config.xml from the package and set the value yourself, scoped where you need it.


The endpoints

Product tax class

Returns the SKUs it did not find, so a partial failure is reported instead of passing as a clean run:

Two deliberate choices:

Negotiated total

B2B totals get agreed off-site. The ERP owns that number; this endpoint only records it so the customer can see it on their order. It is written with saveAttribute, so Magento's balances, totals and invoices are never recalculated — the fiscal document is the one the ERP issues. The value is rendered on the storefront order view and in the admin order view.


Also inside

Notes

Requirements

License

OSL-3.0 — the same license as the Magento core.

Sebastian Artaza · artaza.net · [email protected]


All versions of module-odoo-integration with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
magento/framework Version *
magento/module-backend Version *
magento/module-catalog Version *
magento/module-integration Version *
magento/module-sales Version *
magento/module-store Version *
magento/module-tax Version *
magento/module-webapi Version *
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 artaza/module-odoo-integration contains the following files

Loading the files please wait ...