Spencer Morris スペンサー・モリス← the streetLet's talk
SM02

Equipment Rental ERP

FLAGSHIP · 9 MIN
Execution / flagship case study

A fully-featured ERP used by ~300 people

More than 280 people run a rental company on this software, and the stack it replaces costs about $500,000 a year. Rather than stop the business for a cutover, I made the new ERP prove itself underneath the old one. Odoo takes the nightly legacy data and re-prices the old invoices. Staff get new features inside the screens they already use, and each workspace moves over only after its numbers match.

ExecutionIn production since Aug 2026: 280+ staff, $500K a year replacedApr 2026 to nowArchitect and sole engineer: Odoo modules, staff web app, migration, Business Central extensions, integrations, rollout
employees on the system: 80+ back office, 200+ field
annual software spend replaced
custom Odoo modules, no community module dependencies
posted rental invoice lines brought across or retained
1 Equipment Rental ERP

Nobody had to switch on the same day

The company rents trailers and equipment out of dozens of branches. Its system of record was Microsoft Dynamics 365 Business Central with Rental Advantage, a rental add-on, on top. Around it sat separate services for inspections, GPS tracking and trailer documents. More than 80 back-office employees and more than 200 field employees use this software. The software being replaced costs about $500,000 a year.

A big-bang cutover was never realistic. A single bad day in billing or dispatch reaches every customer at once, and the people who would absorb that day are the ones least able to stop and learn a new tool. So I designed the replacement as a sequence of small moves. First I built the missing pieces inside the old ERP, so staff got e-signature, telematics and inspections without changing screens. Then the new ERP started receiving the legacy data every night and proving it could reproduce it. Workspaces moved over one at a time: collections, fleet reporting, financials. Billing is last, and it is behind an explicit switch.

I have made about 1,400 commits to the repository since April 2026. It holds the Odoo modules, the staff web app, the migration tooling, the Business Central extensions, the e-sign service and the provider integrations.

2 Equipment Rental ERP

One writer for every record

I started in April 2026 with a Next.js app on PostgreSQL and Drizzle. Within a day it had pricing, invoicing, payments, work orders, a customer portal and e-sign. By May it was importing Business Central's raw rental history page by page with checkpoints and retries, and rendering that history in its own screens.

It worked, and that was the problem. I had built a second place where a contract, an invoice or a trailer's status could be written. Two writers for the same business object means every bug turns into a reconciliation question. In June I moved ERP authority to Odoo and demoted the web app to an experience layer. It can send commands to Odoo and serve projections it can rebuild. It cannot create or change a customer, asset, contract, charge, invoice or accounting entry on its own.

That rule is now code. An authority catalog names every cross-system object, its one allowed writer, its external key, its transitions and its reconciliation behavior. A generated document is checked by tests, and the repository rules forbid adding "another business writer, compatibility flag, parallel lifecycle, or provider-owned operational workflow."

3 Equipment Rental ERP

A rental model written from scratch on Odoo 19

The first Odoo deployment was version 16 with an open-source community rental module. When I checked the upgrade path, that module's 17, 18 and 19 branches turned out to be empty. Its last real implementation was 16. Porting it would have kept a second rental model alive with no maintainer behind it. In July I recorded the decision to move to Odoo 19 Community, pinned by image digest, with no community module dependencies at all, and to own the rental depth in 18 custom modules.

The core is trailer custody. Each rental line gets one custody record with six states: assigned, ready for delivery, with customer, return due, returned, cancelled. Nobody can set the state directly. The write method rejects it and points the user to the dispatch and inventory actions. The state is derived from an append-only ledger of custody events: assigned, rescheduled, positioning, checkout inspected, loaded, carrier handoff, customer handoff, check-in inspected, recovered, branch received, returned, cancelled. Every event is checksummed and carries who recorded it, when, where, and the holder before and after.

Two events matter more than the rest. A customer handoff opens the billable service interval and moves the trailer to on rent. A branch receipt closes the interval, releases customer responsibility, and sends the trailer to available, or to maintenance if a dispatch block is set. If the actual handoff or return date differs from the plan after an invoice has already posted, the system opens a billing review instead of quietly re-pricing.

Double-booking is stopped by the database, not by a check in Python. A PostgreSQL exclusion constraint on the trailer and its date range rejects any overlapping assignment while a custody is active. That holds even when two people assign the same trailer at the same moment.

4 Equipment Rental ERP

Migrating millions of rows without guessing a single association

The legacy data is large and imperfect: about 4 million posted rental invoice lines, roughly 900,000 invoice and credit documents, and 1.4 million receivables ledger entries. Pulling it out of Business Central took days, so the migration had to be restartable and checksummed from the first run.

Rentals were replayed in two passes. Active custody went first, historical custody second, each with a stable restart key. Before the active pass writes anything, it proves that the set of source trailers, the set of derived rental terms and the active trailer master are exactly equal. A missing or archived trailer stops the run. It never quietly reactivates one or invents its equipment type. Trailers already with customers at cutover come across as opening balances, without fabricated delivery transfers. Their return is created as a real future movement.

Historical lines without a rental order number are never matched by guesswork. The importer accepts an association only when the same serialized trailer has exactly one order with an overlapping rental interval. Every other row goes to a quarantine with its source key, payload, candidate orders and reason. The run passes only when the source keys fully partition into imported and quarantined, with zero unexplained rows.

The production cutover on August 9, 2026 followed a fixed order. Add the production hostname to the new stack's certificate while DNS still points at the old one. Put retention policies on the old database, filesystem and secrets. Freeze the legacy writers and both upstream feed schedules. Take recovery points of the now-quiet old stack. Run the final delta. Only then move the DNS alias. The old stack stayed restorable, and the new one kept a recovery hostname.

5 Equipment Rental ERP

Billing runs in shadow first

Business Central still issues the customer invoices. If Odoo posted invoices at the same time, every customer would be billed twice. So posting refuses to run unless one system parameter is on, and in production it is off. Odoo still generates periods, calculates charges, validates, approves and creates draft invoices. Finance turns the parameter on at cutover, after Business Central stops forward invoicing.

While the parameter is off, the work is proving parity. Legacy contracts carry 42 deal codes. I classified every one against its full posted history, about 3.4 million lines: 18 supported, 19 needing manual approval, 5 blocked for retirement. Each supported code maps to an explicit calculator. Monthly standard bills the monthly rate per period with no calendar proration. Daily inclusive counts both the start and end day. Best price takes the lowest of the monthly charge and the alternates, including Business Central's own rule: whole weeks plus leftover days, with the leftover days never costing more than one more week. Unknown codes go to a legacy replay calculator that only produces exceptions.

An Odoo versus Business Central screen re-prices every trailer and recurring fee line the old system posted for a branch and month, then stores that evidence next to each pricing rule's approval checklist. Charges fail closed for any of these: a missing customer, product or income account; an unsafe tax mapping; an overlapping or duplicate period; a bad deal code. Credits become native refunds based on the document's sign, never on a negative amount. A rerun never duplicates or edits a posted invoice.

6 Equipment Rental ERP

The new ERP took over underneath the old one

Most employees still work in Business Central, and it is still where most of them read inspections. So I wrote the missing features as Business Central extensions in AL instead of asking staff to change screens. One handles e-signature on rental orders. Another puts SkyBitz and ORBCOMM GPS positions on the fixed-asset page. Others cover inspections, trailer registration and federal inspection documents stored in SharePoint, an invoice email recovery worksheet, and PO and address updates on posted invoices. A single sync fetches inspections once and writes them to both Odoo and Business Central.

E-sign shows why this took care. Each branch has its own contract template and mailbox, so the trailer's branch decides which contract a lease uses. The standard location field turned out to be unreliable. It was missing on about a fifth of assets and stale on some, while the rental add-on's own location field was filled on almost every asset but could not be read from AL. The backend now resolves the branch from the asset record and ranks it above what Business Central reports.

In August I made the lease editor refuse to send a document whose totals were not what they appeared. A rate box containing "call for pricing" had been counted as zero, so a two-trailer lease printed one subtotal while one trailer was silently left out. Concurrent edits were also overwriting each other: six trailers added at once came back as one. The fix serializes the editor's requests and locks the row. The first version of that lock read data while holding the transaction. It passed locally on a five-connection pool. On the hosted pool, which has one connection, the read would have waited ten seconds for the connection its own transaction held, then failed. I moved the read outside the lock.

7 Equipment Rental ERP

Version 1 has nine workspaces

The staff web app went to production on September 4, 2026 with nine workspaces: home, equipment, inventory report, customers, rental orders, invoices, collections, financial breakdown, and documents and e-sign. Dispatch, yard, maintenance, learning, general ledger and the customer portal were removed from the release. That release cut 17,397 lines and kept both e-sign paths intact behind 86 protected checks.

The app reads Odoo through signed, cursor-paginated contracts. Each response carries the source timestamp, and the cache adds when the data was fetched. Every page shows both and has a refresh button that bypasses the cache. A stale response keeps its real age and is never labeled live. Ctrl+K search runs on Typesense across equipment, customers, rental orders and invoices. Branch scope is enforced before results leave the server, and an exact-identifier lookup in PostgreSQL covers search outages.

Sessions last 30 days with a 14-day idle limit. Each refresh rotates the token, and reusing an old token revokes the session. If Odoo fails to answer, which happens for a few seconds during every rolling deploy, the session keeps running on its last verified claims for 15 minutes instead of signing everyone out.

8 Equipment Rental ERP

The booking site sits on a rental counter system with no modern API

A related truck rental operation books through a counter system whose only integration is an XML service. It quotes rates for one pickup location at a time, and a single message creates a reservation. The public booking site needs availability across every location for whatever dates a visitor picks, and the counter system cannot answer that question.

I built a Fastify and tRPC booking API that precomputes availability windows into Redis, using a refresh worker on AWS. Calls to the counter system are spaced at least two seconds apart, with a small retry budget. Freshness depends on how soon the pickup is: windows two or fewer days out refresh every 15 minutes, up to two weeks out every 6 hours, beyond that daily. The reservation-creating message is never used for testing, because the vendor's "demo" endpoint returned the same rate IDs as production.

The vendor has no reporting API either. Scheduled reports arrive by email into S3, a headless exporter backfills monthly history, Athena serves the tables, and a daily fleet brief goes out at 7:05 AM.

⇄ Route map

How the pieces connect

nightly delta feedsextends screenssigned commands and readsprojection eventsserver-side queriesone-time handoffsignature requestspositions, inspectionspositions, inspectionshistory export1Legacy ERP2Business Central extensio…3Odoo 19 Community4Staff web app5Search index6E-sign service7Providers8Booking API9Reports lake
1. Legacy ERP. Business Central with a rental add-on. Read-only source for migration, and it still issues invoices until billing cutover.
2. Business Central extensions. AL extensions for e-sign, telematics, inspections, trailer documents, invoice email recovery and invoice edits, so staff gain features without switching screens.
3. Odoo 19 Community. The single ERP authority: 18 custom modules for custody, billing, collections, finance and fleet reporting, on AWS ECS and RDS.
4. Staff web app. Next.js on Vercel. Nine workspaces, signed Odoo commands, caches that show source time and fetch time.
5. Search index. Typesense for Ctrl+K across equipment, customers, rental orders and invoices, branch-scoped on the server.
6. E-sign service. DocuSeal fork with HMAC-signed webhooks and a locked document archive. Serves both the Business Central flow and the Odoo flow.
7. Providers. SkyBitz and ORBCOMM GPS, the inspection vendor, SharePoint documents.
8. Booking API. Fastify and tRPC over a rental counter system's XML service. Redis availability windows, throttled refresh worker.
9. Reports lake. Counter-system reports by email into S3, Athena tables, daily fleet brief.
✓ Tickets

Decisions, and what I gave up for them

DECISION01

One ERP authority

CHOSE
Odoo as the only writer of business records, with the web app limited to commands and rebuildable projections
OVER
the Next.js and PostgreSQL ERP I had already built, running beside Odoo
WHY
Two writers for contracts and invoices turn every bug into a reconciliation. An executable authority catalog now names the single writer for each object, and tests enforce it.
DECISION02

Odoo 19 Community with owned rental modules

CHOSE
Odoo 19 Community pinned by image digest, with the rental, billing, collections, e-sign and learning depth in custom modules
OVER
porting the Odoo 16 community rental module, or Odoo Enterprise
WHY
The rental module's branches after 16 are empty, so porting it meant keeping an unmaintained second rental model. Community can be built and tested entirely inside the repository without a subscription.
DECISION03

Shadow billing behind a single switch

CHOSE
Odoo calculating, validating and drafting every invoice while posting stays disabled until finance turns it on
OVER
a dated billing cutover
WHY
Business Central still invoices customers. Posting from both would double-bill. The shadow run produces branch-by-month parity evidence that finance can sign off on.
DECISION04

Quarantine instead of guessing

CHOSE
accepting a historical line's rental order only when exactly one order overlaps for that serialized trailer, and quarantining every other row with its reason
OVER
best-effort matching by date or customer
WHY
One wrong association moves a trailer's revenue and custody history to the wrong customer. A quarantine with zero unexplained rows can be audited. A fuzzy match cannot.
DECISION05

Meet staff in the old ERP first

CHOSE
Business Central extensions for e-sign, telematics, inspections and trailer documents
OVER
moving all users to a new interface at cutover
WHY
Field and back-office staff got new capability with no retraining. Their screens change later, one workspace at a time, once the data behind each one is proven.
⏱ Timetable

Timeline

  1. First commit: Next.js and Drizzle operating platform
  2. Business Central seed pipeline and SkyBitz telematics sync
  3. E-sign built into Business Central rental orders
  4. Odoo migration and nightly sync from Business Central
  5. Decision: Odoo 19 Community, community rental module removed
  6. Odoo 19 candidate delivered, 1,014 files changed
  7. Production cutover to Odoo 19
  8. Collections workspace released to production
  9. Staff web app version 1 in production, 17,397 lines removed
  10. Sync alarms wired to operators after a silent nine-day outage
  11. Inspections and GPS positions synced to both ERPs
  12. Booking side: report history in Athena and a daily fleet brief
Odoo 19 CommunityPythonPostgreSQLNext.jsReactTypeScriptDrizzleTypesenseAL (Business Central)AWS ECS, RDS, EventBridge, S3VercelDocuSeal (Rails fork)FastifytRPCRedis
Sources and method

Written from the project's code, documentation and commit history, reviewed in November 2026. Business figures come from me. Clips and screenshots are labelled with where they came from; none show customer data.

  • README.md
  • docs/odoo-system-direction.md
  • docs/program/decisions/0002-odoo-19-community-baseline.md
  • docs/odoo-erp-replacement-roadmap.md
  • docs/program/status.md
  • docs/cutover-playbook.md
  • docs/program/runbooks/odoo19-fast-promotion.md
  • docs/ops-v1-consolidation-plan.md
  • docs/billing-engine.md
  • docs/program/parity/billing-behavior-matrix.csv
  • docs/development/esign-integration.md
  • config/odoo-platform-lock.json
  • odoo-addons/rental_lifecycle/models/lifecycle.py
  • odoo-addons/rental_operations/models/custody.py
  • odoo-addons/billing_engine/models/calculation_kernel.py
  • odoo-addons/billing_engine/models/service_boundary.py
  • odoo-addons/billing_engine/models/billing.py
  • business-central/README.md
  • record360/README.md
  • git log (commits 6fe0830a, cb6cc8fd, c57e2c56, ad2f57f3, 6ac3f6c2, d7a88442, 4fa85d02)
  • tsd_backend: README.md, apps/api/src/env.ts, apps/api/src/lib/network-availability-refresh.ts, apps/api/src/lib/network-availability-window.ts, git log