← All projects
Live · in daily use

Replacing a trading business's accounting stack

A paid accounting package retired, a stale Odoo instance rebuilt into the single source of truth, and daily billing turned into one line of chat.

Client
A spare parts trading business, Pakistan. Anonymous by request.
Role
Migration, reconciliation, module development, automation
Stack
Odoo 17 Community, Python, Claude Code, Discord
Cadence
Daily 07:00

The situation

Two systems, one set of facts, and no agreement between them.

The business ran its day to day books in a paid accounting package, with a licence fee going out every month. An Odoo instance sat alongside it, stale and unreconciled. Neither system could be trusted on its own, so every report had to be produced by hand from whichever one was believed that week.

Every customer payment was typed in manually. Ledgers and aging reports were compiled by hand whenever someone asked for one. The work was not complicated. There was just a great deal of it, every single day.

What changed

10,000 → 0 Monthly licence in PKR. Odoo Community is free and the instance runs on a free tier cloud server.
4–5 hrs/day Manual billing and payment entry no longer exists as a daily task. Entries create themselves and wait for approval.
Same headcount The hours that went into data entry now go into strategy and market penetration.

What was built

Retired package SOURCE OF RECORD Extract + map PYTHON, NO RETYPING Odoo 17 SELF-HOSTED Reconcile to exact figure GROUP, DIFF, TRACE Discord bot DRAFT ENTRIES 4 custom modules LEDGER · AGING · P&L · MAILER
The migration path and what sits on top of it

A full migration with no manual re-entry

The source system has no export API. Every customer, supplier, invoice, receipt, payment, credit note and journal entry was extracted, mapped and posted programmatically. Nobody retyped a row.

Accounting errors found and corrected

Payments were routing through clearing accounts instead of reaching cash. Owner capital sat buried in an undistributed plug account instead of named equity. Inventory carried a dead stock balance nobody had cleared. Each was traced to root cause and fixed with a posted journal entry, not a spreadsheet adjustment.

Reconciliation to the exact figure

Receivables, payables, sales income and stock in hand all closed to exact matches against the source system. Where they did not match, the gap was traced to the individual transaction rather than plugged.

Four custom Odoo modules

Odoo Community ships without a financial reports engine. I built a combined customer and vendor ledger, a receivables and payables aging report, a profit and loss and balance sheet generator, and a daily report mailer.

The decisions that mattered

The migration was the easy half

Reconciliation was the real job, and it was forensic. The source system has no invoice numbers, so nothing could be matched one to one. The method instead: group both systems by date and party, diff the sums, then chase every discrepancy down to a specific transaction.

That found a full day's receipts that had fallen through the gap between two sync passes. Two payments to the same supplier on consecutive days, where only one had ever been captured. Invoices with no supplier attached, invisible to any comparison based on partner names.

It caught its own mistakes, which matters more than getting it right first time

One import routed hundreds of entries through the wrong account. Caught by checking a balance that should always read zero, then reversed and reposted correctly.

A later fix quietly double counted two entries. Caught because the balance sheet total moved away from the target instead of toward it. That became a standing rule on this project: after any fix, check whether the higher level total moved toward or away from where it should be. Moving away means the fix double counted something.

Ruling out the data problem before touching the code

When the owner asked why Odoo only ever showed the customer side for a party that was both a customer and a vendor, the obvious guess was duplicate partner records. It was not. There were exactly six partners with genuine dual activity and all six were correctly flagged. The real cause was a bespoke ledger module that had been written customer-only, with the receivable account type hardcoded, plus a built-in partner ledger action that had no menu item pointing at it at all. Orphaned, and invisible from the interface.

How it was done

An agent doing the work, not answering questions about it.

Claude Code drove the whole of it. The extraction, the mapping, the diffing, the journal entries, the custom module code, the deployment to the server. Not a chatbot explaining accounting concepts. An agent posting entries into a live set of books, with a human checking the totals after every pass.

The code was the agent's. The decisions about what was correct were mine. On a project like this that division holds up, because the hard part was never the syntax.

I have no coding background. What I brought was accounting judgment: knowing what the totals were supposed to say, and refusing to accept a figure that had been plugged rather than traced.

Where it stands

Live, in daily use, and reconciled. The books agree. The reports send themselves. Payment entry takes one line of chat instead of a form, and the monthly licence fee is gone. The old accounting package has been fully retired.

Open and honest about it
  • A small residual remains on cash and stock in hand, roughly a tenth of a percent of the balance sheet. Tracing it would mean a line by line diff of several thousand cash-touching transactions. I flagged it rather than plugging it, and left the decision to pursue it with the owner.
  • One pre-existing bug in the daily mailer was found and reported rather than silently fixed: the full consolidated ledger attachment is too large for the PDF renderer at that scale and fails silently behind an existing guard. Per-salesman and per-customer statements are unaffected.
  • A mature open-source financial reporting module sits uninstalled on the server and would likely replace the bespoke wizards long term. That is a bigger, discretionary change, so I raised it as a decision rather than making it.
On the client's privacy

The business is not named here and no figures from their books appear anywhere on this site. The licence fee and the hours are mine to disclose. Their balances are not.