> ## Documentation Index
> Fetch the complete documentation index at: https://filecheck.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Odoo

> How the Filecheck module for Odoo eCommerce mounts the Element, carries the job onto the sale order, and syncs orders and print files.

The Odoo module follows the same pattern as the other [store plugins](https://filecheck.io/docs/integrations/woocommerce.md): the Element on the product page, **Add to cart** gated on `canProceed`, and the `jobId` persisted on the order. It differs in how the job reaches the cart, because Odoo's add-to-cart is a JSON call that posts none of the product page's own inputs. Merchants install it from the [Odoo installation guide](https://filecheck.io/docs/tutorials/odoo-installation.md). The source is on [GitHub](https://github.com/PrintApp/filecheck-odoo).

## Product page

Above Odoo's quantity and **Add to cart** block, the module renders a mount point, its settings as JSON, and the per-key script:

```html theme={null}
<div id="fc-slot-{productTemplateId}" class="o_filecheck_slot"></div>
<script src="https://cdn.filecheck.io/element/{pk}/filecheck.js" async></script>
```

A small script then calls `Filecheck.mount` with the product's `workflowId`, `presentation`, `connectorId` and `artworkTiming`, and `cartButtonSelector: '#add_to_cart, .o_we_buy_now'`. Odoo's **Add to cart** and **Buy now** are links rather than buttons, so `mount()` can only mark them `aria-disabled` and `.filecheck-gated`; the module blocks clicks on gated links itself.

## From the page to the order

**1. Each status goes to the session**

On every `status` event the script posts the `jobId`, whether it can proceed, and the file names to the module's `/filecheck/save_job` JSON route, which keeps them in the Odoo session for that product. **Add to cart** stays gated until the save lands.

**2. Add to cart copies the job onto the line**

When the product is added to the cart, a job that can proceed is copied onto the new sale order line, with the file names in the line description. Each uploaded file gets a cart line of its own.

**3. Confirmation sends the order to Filecheck**

When the order is confirmed, the module sends it to [`POST /orders/{id}`](https://filecheck.io/docs/api-reference/orders/capture-an-order) from a background job, with retries. Lines with a file carry their `jobId`. Lines of a Filecheck product without one carry `"awaitArtwork": true` and the product's `workflowId`, whatever the product's timing, since such a line exists only when the upload could not run. Cancelling the order sends its new status.

**4. Print files are saved on the order**

Once a job has finished, the module reads its runs and downloads each run's `downloadUrl` (the corrected file, else the upload) as an attachment on the sale order. Those URLs are presigned and short-lived, so they are fetched fresh each time and never stored.

For orders waiting for artwork, the module fetches [`GET /orders/{id}/upload-link`](https://filecheck.io/docs/api-reference/orders/get-an-order-upload-link) for the confirmation page, the portal and the email. It asks again every 30 minutes for 60 days, and puts the jobs customers create on the upload page onto their order lines.

## Settings

Keys and defaults live on each Odoo website: publishable key, secret key (system administrators only, never sent to the storefront), `agentId`, default Workflow, artwork timing and presentation. Each product chooses off, the website's default Workflow, or a specific one, plus its own timing, presentation and [Connector](https://filecheck.io/docs/element/connectors.md).

Two System Parameters change the defaults:

| Parameter | Default | Use |
| - | - | - |
| `filecheck.api_url` | `https://api.filecheck.io` | Point the module at another API, for example a staging one. |
| `filecheck.max_file_mb` | `512` | The largest print file saved on an order, in MB. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.