The Odoo connector
Seven LGPL-3 addons that publish Odoo's products, contacts, lots and serial numbers to a GS1 Digital Link and report what happens to them as EPCIS 2.0 events: one page per addon, and a warehouse day walked through screen by screen.
Product name, brand, weight, country of origin and manufacturer, the data a passport is built from, are already kept in the ERP. The Odoo connector publishes them from there so that nobody has to type them a second time, and it also reports what happens to the goods afterwards, which goes beyond what a PIM can offer.
Odoo publishes from inside Odoo. The addons run in the ERP, queue a record when it is saved and deliver it in the background on a schedule, so no service of ours needs access to your database. The UnoPim, ERPNext and metasfresh routes work the other way round: there a service of ours polls the source system.
Seven addons, two services
The connector follows Odoo's own module boundaries. The base addon depends on product alone. Everything that needs another Odoo app is a bridge, which installs itself as soon as that app is present, so a database only ever carries code for the apps it actually runs.
| Addon | What it adds | Installs | Talks to |
|---|---|---|---|
openepcis_connector | Products and company contacts as GS1 master data; Draw GTIN; the field mapping; the first load | By hand | Resolver |
openepcis_connector_stock | Lots and serial numbers as per-instance documents | With Inventory | Resolver |
openepcis_connector_product_expiry | Mapping rows for the expiry dates on lots | With Expiration Dates | Resolver |
openepcis_connector_events | Transfers, packing, returns and withdrawals as EPCIS 2.0 events; an inbox for partners' events | By hand | EPCIS repository |
openepcis_connector_events_mrp | A manufacturing order as one TransformationEvent | With Manufacturing | EPCIS repository |
openepcis_connector_events_pos | A till's operation type reads as a sale | With Point of Sale | EPCIS repository |
auth_oauth_end_session | Logging out of Odoo also ends the OpenID provider session | By hand | Your identity provider |
It helps to keep the two services apart from the start. The resolver holds master data, that is, what a product is, and the three master-data addons write to it. The EPCIS repository holds events, that is, what became of a product, and the three events addons write to it. The two run on different hosts and are configured separately, and one offline token serves both.
The Learn More button on each addon's tile in Odoo's app list opens the page linked above.
Installing
git clone https://github.com/openepcis/openepcis-odoo.git
# put the repository on your addons path, then:
odoo -d yourdb -i openepcis_connector
Then open Settings → General Settings → OpenEPCIS and enter the resolver's URL and an offline token issued in the OpenEPCIS web interface. The bridges follow on their own once Inventory, Expiration Dates, Manufacturing or Point of Sale is installed. The events addon is a separate second step that you install by hand, because reporting movements to a shared repository is a decision each company should take consciously.
Following Odoo's convention, there are two branches: 18.0 for the current long-term release and 19.0 for the newest one. Both carry the same addons with the same behaviour and differ only where Odoo itself does. Odoo 19 can nest packages, so only there does a pallet of cases produce an aggregation of SSCCs.
The repository is openepcis/openepcis-odoo on GitHub, under LGPL-3. Its docker/demo directory describes a demo container image with all six connector addons preinstalled.
Where to start
- Master data first. In the connector, give a product a barcode or draw one, set the GPC brick on its category, tick Publish to OpenEPCIS, and let the readiness line tell you what a registry still wants.
- Then the instance level. Lots and serial numbers follow the product into the catalog with one document per batch or unit, and a QR code appears on the lot form, where labels are actually printed.
- Then events. Visibility events need a GLN on a location and a business step on an operation type. From then on every validated transfer tells the repository what moved.
- See it end to end. A warehouse day follows a receipt, a pallet, a delivery, a return, a grinding run and a withdrawn report across eleven screens and twelve events, each copied from the outbox.
What it does not do
Products travel in one direction only: changes made to them in the OpenEPCIS web interface stay there. Organizations are the exception and come back into Odoo on a schedule. Because a PUT merges into the published document, clearing a field in Odoo leaves the published value in place; removing a published value is something you do explicitly in the catalog. Warehouses receive GLNs so that events can name them, but they are not published as GS1 places of their own.
Drawing identifiers has real effects. There is no GS1 sandbox, and a registered GTIN stays registered for good. Draw GTIN holds a number only until the product is saved, and while it is held it can still be handed back; once confirmed, it cannot. Test against a development deployment with the operator's dry-run flag on, and use identifiers in the 952 range, which GS1 reserves for exactly this purpose.