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

# Understand external stock by location

> See how an external stock read maps to specific Odoo locations, how to inspect freshness, and why an observation is not a stock booking.

The optional Odoo UNS Connector stock extension shows what an external system reports for a defined scope. It helps a warehouse user compare an observation with Odoo's own stock without silently changing inventory or valuation.

[Nederlands](https://docs.sheetmetalconnect.com/nl/odoo-uns/external-stock.md)

## One scope, specific locations

Suppose an external storage system reports sheet stock in two racks. A configured source and scope identify the external query. Article mappings connect each external article, location and unit to an existing Odoo product, an existing **internal location** and the product's stock unit. The location on a mapping is specific: it does not select an entire warehouse or automatically include other locations.

```mermaid theme={null}
flowchart TD
  E["External storage system"] -->|"Read for configured scope"| S["Stock source"]
  S --> M["Article and location mappings"]
  M --> O["Observed external stock"]
  N["Odoo native lot stock"] --> C["Compare quantities"]
  O --> C
```

For one product, the mappings can distinguish two positions:

| External location | Odoo internal location |
| - | - |
| `RACK-A` | `WH/Stock/Sheet-A` |
| `RACK-B` | `WH/Stock/Sheet-B` |

The integration service is configured to query the intended external scope and send the matching location references. A UNS Manager creates the corresponding Odoo mappings. The scope identifies that query; it is not an Odoo warehouse selector. Odoo distinguishes warehouses from their locations in its [inventory documentation](https://www.odoo.com/documentation/19.0/applications/inventory_and_mrp/inventory/warehouses_storage/inventory_management.html).

![Two external rack locations mapped to separate internal Odoo stock locations](https://mintcdn.com/sheet-metal-connect/SM9SWTPxJDqcqJaT/images/odoo-uns/external-stock-locations-en.png?fit=max\&auto=format\&n=SM9SWTPxJDqcqJaT\&q=85\&s=6382eab2b520c15d1fdc04d490fb2349)

Illustration with demo data: external positions and manager-only article mappings.

## Read the external position

**1. Open the source**

Open **UNS → External stock** and select the relevant source. Its company and scope identify which external read the page describes.

**2. Inspect the observation**

Under **Observed external stock**, check the mapped product, location and observed quantity. **Read history** shows previous reads. The latest successful read time tells when the connector last received a successful result; an external source timestamp can be absent.

**3. Compare with Odoo stock**

Compare the external position with **Native lot stock** where lot mappings are configured. Native stock and reservations are Odoo records. A difference needs investigation under the agreed process; the observation itself does not book a correction.

An empty read does not mean zero stock. A successful read of a partial scope does not establish quantities outside that scope. Freshness depends on the configured limit: a stale indication means the last successful read is older than that limit. It does not itself say what the physical quantity is now.

> [tab] External observation
>
> The source reports what it read for the configured scope. An observation does not change Odoo inventory.

> [tab] Odoo stock
>
> Native lot stock shows Odoo quantities and reservations for mapped lots. A separately authorized request may book a native movement after its checks pass.

## Configure the mapping

> [!NOTE]
>
> Source configuration and mappings are for a UNS Manager or administrator. A UNS User can read the information; the integration role submits the messages.

**1. Define the external source and scope**

In **UNS → External stock**, create a source with its company, source reference and scope reference. Together they identify the configured query scope for that company. The integration service must use the matching source and scope.

**2. Map each external position**

Under **Article mappings**, map the external article, location and unit to an existing product, internal Odoo location and its stock unit. The connector does not convert units. An unmapped article, location or unit causes the read to be rejected rather than guessed.

**3. Add lot mappings when native booking is needed**

**Native lot mappings** link an external lot to an existing lot of the mapped, lot-tracked product. Native stock booking is a separate authority on the source; observation does not enable it. An article mapping cannot be reassigned after it has an observed position or a lot mapping. The mapping lists do not offer deletion.

```mermaid theme={null}
flowchart TD
  R["External stock read"] --> V{"Source and mappings valid?"}
  V -->|"No"| X["Rejected with reason"]
  V -->|"Yes"| O["Observation and read history"]
  O --> N["No native stock movement"]
  B["Separate native stock request"] --> A{"Source authority and lot mapping valid?"}
  A -->|"No"| X
  A -->|"Yes, all checks pass"| P["Odoo stock action"]
```

> [!NOTE]
>
> Enabling **Authorize native stock booking** authorizes the source for initial stock, stock corrections, internal transfers and production material consumption together. It is not a separate switch for each action or location. Mappings, any additional authority and Odoo business checks still apply.

See [settings](https://docs.sheetmetalconnect.com/odoo-uns/settings.md) for production consumption and receipt publication, and [troubleshooting](https://docs.sheetmetalconnect.com/odoo-uns/troubleshooting.md) when a stock read or booking is rejected.


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