Skip to content
ERP systems

Odoo

How Odoo 19 hands lots and serial numbers to BatteryPass through the JSON-2 API.

This page describes an integration pattern. BatteryPass ships no connector for Odoo and has no partnership with Odoo S.A.; nothing here is a vendor approval.

Odoo 19 offers the JSON-2 API: POST /json/2/<model>/<method> with an API key as bearer token. Serial numbers are records of stock.lot, manufacturing orders of mrp.production. The odoo-stock-lot preset maps the lot or serial number and the product's internal reference; Odoo keeps no manufacturing date on the lot, so the middleware adds the column "Manufacturing Date", for example from the end date of the manufacturing order.

API keys carry an expiry date: put their rotation in your operations plan, as you do for the BatteryPass key. XML-RPC and JSON-RPC are deprecated and go away with Odoo 22 (fall 2028) and Odoo Online 21.1; do not build new integrations on them.

Automation rules can send a record to a URL as an outgoing webhook. The payload is not signed, so treat it as a hint: the middleware reads the record through the JSON-2 API before it acts. From there, follow units from production.

Interfaces and how they were checked

Vendor
Odoo S.A.
Deployments
Cloud: Odoo Online and Odoo.sh 19
On-premise: Odoo 19 Community and Enterprise

Odoo 19 offers the JSON-2 API with API keys as bearer tokens; XML-RPC and JSON-RPC are deprecated and go away with Odoo 22 (fall 2028) and Odoo Online 21.1. API keys have an expiry date: rotation belongs in the operations plan.

An integration pattern, not a connector: BatteryPass ships no ERP connector and holds no vendor certification.

InterfaceProtocolSign-inEventsObjectsChecked
JSON-2 API (/json/2/<model>/<method>)
Every model, for example product.product, stock.lot, mrp.production
RESTAPI keynoneProduct/material master, Batch/serial number, Production order, Delivery/goods issue, Returnchecked in the vendor documentation, 24/10/2026
Webhooks (automation rules)
Outgoing webhooks from automation rules
RESTAPI keyWebhooks (not signed)Product/material master, Batch/serial number, Production orderchecked in the vendor documentation, 24/10/2026
XML-RPC and JSON-RPC (deprecated)
Older external API
XML-RPCAPI key, SessionnoneProduct/material master, Batch/serial number, Production order, Delivery/goods issue, Returnchecked in the vendor documentation, 24/10/2026

Notes

  • Webhooks (automation rules): The payload is not signed; for incoming webhooks the secret URL is the protection.
  • XML-RPC and JSON-RPC (deprecated): Do not use for new integrations.

Import presets

Odoo lots and serial numbers (stock.lot) (odoo-stock-lot): An export of the stock.lot model from Odoo with the product's internal reference. Odoo keeps no manufacturing date on the lot; the middleware adds the column "Manufacturing Date", for example from the end date of the manufacturing order.

Column in the exportField in BatteryPass
Lot/Serial Number (also name, Los-/Seriennummer)Serial number identification.serial_number
Product/Internal Reference (also product_id/default_code, Produkt/Interne Referenz)Model identifier / SKU identification.model_identifier
Manufacturing Date (also date_finished, Herstelldatum)Manufacturing date identification.manufacturing_date

Generic CSV file (generic-csv): For any ERP and for files a middleware writes itself: GTIN, serial number, manufacturing date, facility (name or GLN), model version and battery status, with German and English column names.

Column in the exportField in BatteryPass
GTIN (also EAN, GTIN-13, GTIN-14)GTIN (GS1) identification.gtin
Serial number (also Seriennummer, serial_number)Serial number identification.serial_number
Manufacturing date (also Herstelldatum, manufacturing_date)Manufacturing date identification.manufacturing_date
Facility (also Produktionsstätte, Facility GLN, Werk-GLN)Place of manufacture identification.manufacturing_place
Model version (also Modellversion, model_version)Model version model_version
Battery status (also Batteriestatus, battery_status)Battery status identification.battery_status

Workflows

  • Units from production: Serial numbers from the production confirmation or goods receipt are staged as an import; members review, commit and approve before any passport appears. Key scopes: import
  • Passport links back into the ERP: The middleware follows the change feed and writes the GS1 Digital Link and the passport status to the serial number record in the ERP, so labels and delivery papers carry it. Key scopes: read
  • Returns and repairs as lifecycle events: Completed repairs, inspections and component replacements from service or return orders appear as events in the unit's history. Key scopes: readcondition
  • Product change leads to a new model version: A change to the product master in the ERP triggers a notification; a member creates a new model version in BatteryPass. Declared data is never written automatically. Key scopes: read

On this page