| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Purchase (purchase) • Sales (sale_management) • Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 9076 |
| Technical Name |
eh_log_cold_chain |
| License | LGPL-3 |
| Website | https://www.erpheritage.com.au/ |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Purchase (purchase) • Sales (sale_management) • Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 9076 |
| Technical Name |
eh_log_cold_chain |
| License | LGPL-3 |
| Website | https://www.erpheritage.com.au/ |
Cold Chain Monitoring
Per cargo temperature profiles, append only readings, a sustained breach deviation detector, and a per run compliance certificate, wired into the freight job.
Why this module
Cold Chain Monitoring
Sustained breaches, not spikes
A reading outside the profile thresholds does not raise an alert on its own. The detector walks readings in time order, groups continuous high or low segments, and only opens a deviation once a segment lasts at least the profile alert window. Transient spikes during gate-in or a door-open are logged but do not page.
Append only, guarded transitions
Readings are append only at the API level: after capture only the sensor reference and source can change, every other field is blocked. Run and deviation states move only through the action buttons, direct state writes raise, and each transition is logged as a structured event. The record of what happened cannot be quietly rewritten.
One certificate, one honest verdict
Each run renders a compliance certificate PDF: profile, window, min, max and average recorded, the full deviation table, and a single COMPLIANT or NON-COMPLIANT verdict driven by whether any deviation was flagged cargo impacting. The verdict line is computed from the data, not typed by hand.
Day in the life
An operator closes out a pharma reefer run.
A pharma shipment confirmed with Cold Chain Required spawned a monitoring run on its freight job at the PHARMA-2-8 profile (2 to 8 degC, 30 minute alert window). The operator activates the run, then loads the sensor dump through the ingest method, which writes the readings in one batch and re-scans for deviations. One sustained high segment crossed 8 degC for 45 minutes during a loading delay, so a single high deviation row is open. The operator acknowledges it, classifies the cause as loading or unloading, and because it did not compromise the consignment, leaves it not cargo impacting and resolves it. Completing the run lands it in completed rather than breached, the certificate prints COMPLIANT with the deviation still listed in full for the consignee, and every step is on the chatter and the event log.
Edge cases
The cases most modules quietly ignore.
In the shipped code today, each one a place where a cheaper module silently does the wrong thing.
A breach shorter than the profile alert window never opens a deviation. The detector measures the continuous duration of each out-of-band segment and discards segments under the threshold, so a momentary spike during gate-in is recorded as a breach reading but does not raise a deviation.
High and low excursions are separated. When readings cross below the minimum and later above the maximum, the detector closes the low segment and opens a distinct high deviation rather than merging them, so each excursion carries its own kind, window, and recorded extremes.
Re-running detection after more readings arrive extends the matching open deviation in place rather than creating a duplicate. A breach that overlaps an existing open deviation of the same kind widens that row's end time and recorded min and max instead of spawning a second one.
An excursion still active at the last reading is captured. The detector records the open segment from its start to the final reading timestamp so a run that ends mid-breach is not silently left without a deviation.
A deviation that is not flagged cargo impacting leaves the run compliant. Completing a run with open but non-impacting deviations lands in completed and prints COMPLIANT, while a single cargo-impacting deviation routes completion to breached and prints NON-COMPLIANT.
A deviation cannot be resolved without a cause classification, and cannot be voided as a false alarm without a justification in the resolution notes. The guards raise rather than allowing an unexplained close.
Once a reading is captured its timestamp, temperature, and humidity are frozen. Any attempt to edit them raises, listing the forbidden fields, so the time series stays a faithful record of what the sensor reported.
Bulk ingest is rejected unless the run is active. Readings cannot be appended to a draft, completed, breached, or cancelled run, which keeps the monitored window bounded to the active period.
Runs, readings, and deviations all carry the company and sit behind a global isolation rule, so cross-company records never leak between operators. Profiles are deliberately shared reference data across companies.
What is inside
Built to do the job, end to end.
- Cold chain profiles. Reusable temperature regimes with a category (pharma, chilled, frozen, deep frozen, controlled room, dry ice, custom), strict min and max thresholds, optional humidity band, sampling cadence, alert window, and excursion grace. A constraint enforces min strictly below max. Six profiles ship as data.
- Monitoring run. One run per freight job and profile, with a guarded state machine: draft, active, completed, breached, cancelled. Stores started and completed timestamps and computes min, max, average recorded, reading count, open and total deviation count, and the compliance flag.
- Time-series readings. Per-timestamp temperature and humidity rows indexed on run, captured-at, and source, carrying an optional sensor reference and a source tag (manual, bulk ingest, telematics, portal, api). Append only after capture and built to hold a high reading volume per run.
- Bulk ingest method. An ingest_readings model method accepts a list of timestamp, temperature, and optional humidity samples, writes them in one batch, and re-runs deviation detection. It is a Python entry point for adapter and integration code to call, not a shipped HTTP endpoint or import wizard.
- Deviation detector and workflow. Auto-created deviation rows carry kind, window, recorded extremes, and duration, plus a resolution workflow: acknowledge, resolve with a required cause, void with a required justification, or flag cargo impacting. Cause options cover equipment failure, door open, loading, ambient, calibration drift, transit delay, and operator error.
- Compliance certificate. A per-run PDF rendered against the shared logistics report styling: run, job, profile, window, reading summary statistics, the full deviation table, a computed COMPLIANT or NON-COMPLIANT verdict, and a signatory block for the consignee or auditor.
- Quotation and freight job wiring. Sale orders gain a Cold Chain Required flag and a default profile selector. The freight job spawn reads them and auto-creates the monitoring run, or posts a chatter note prompting manual creation when the flag is set but no profile was picked. The freight job carries a stat link to its runs.
Honest about the edges
What this does not do, so nothing surprises you.
- Readings arrive through manual entry or the ingest_readings model method. This module does not ship an HTTP ingest endpoint, a signed sensor-gateway webhook, or a CSV import wizard. Connecting a specific logger or telematics platform is integration work that calls the ingest method.
- The deviation detector evaluates all of a run's readings together against the profile thresholds in timestamp order. It does not segment or score per individual sensor, so multiple loggers feeding one run are treated as a single combined stream.
- Humidity bands can be configured on a profile and humidity can be stored per reading, but the sustained-breach detector acts on temperature thresholds only. Humidity is recorded, not alerted on.
- The profile sampling cadence and excursion grace are stored as configuration. There is no scheduled job that flags missing readings or auto-closes a run, so detection runs when readings are ingested or the method is called.
- This is a monitoring and compliance module. It does not perform dangerous-goods classification, customs declaration, or EDI messaging, and it ships no country customs pack. It depends on the logistics base, quotation, and freight modules and is meant to run alongside them.
cold chain monitoring Odoo, temperature controlled cargo, pharma cold chain GDP, reefer container monitoring, frozen and deep frozen cargo, chilled and controlled room, temperature excursion detection, cold chain deviation workflow, compliance certificate PDF, freight forwarding temperature, Odoo 19 Community logistics, append only sensor readings, monitoring run lifecycle, cargo temperature profile, 3PL cold chain
Please log in to comment on this module