Case Study · ERP Migration & Financial Systems
Excel Chaos to Auditable Odoo 19 ERP & Compliance Engine
A 4-month engagement migrating a KSA material trading and manpower contracting enterprise from fragmented spreadsheets to a fully compliant Odoo 19 ERP—with automated payroll, ZATCA e-invoicing, and a 4-plan analytic accounting framework.
- Industry
- Material Trading & Manpower Contracting
- Region
- Saudi Arabia (KSA)
- Role
- Fractional CFO & Financial Systems Architect
- Timeline
- 4-Month Engagement
Stack
- ZATCA compliance
- 100%Bilingual e-invoicing
- Faster payroll processing
- 85%3 days → < 1 hour
- To live accounting cutover
- 4 weeksFrom kickoff to production
- Employees on automated WPS
- 160+Previously manual spreadsheets
Executive Summary
A multi-company enterprise delivering high-volume material trading and manpower contracting in Saudi Arabia had outgrown Excel. They faced mounting operational friction: untracked statutory employee compliance (Iqamas, GOSI, WPS), zero real-time visibility into segment and contract-level profitability, and an urgent deadline for ZATCA e-invoicing compliance.
Over a 4-month engagement, I architected and delivered an end-to-end migration from fragmented spreadsheets to Odoo 19 Enterprise. Beyond a standard ERP deployment, this transformation delivered automated idempotent data migration pipelines, a 4-dimensional analytic accounting framework, full KSA statutory compliance, and an automated weekly deduplication and data hygiene toolkit empowering non-technical accounting staff to maintain pristine master data permanently.
The Challenge
Siloed profitability data
Leadership could not evaluate whether the Material Trading unit or the Manpower Contracting division was driving net margins after allocating direct costs, deployed labour, and overhead.
Complex KSA statutory payroll overhead
Calculating GOSI contributions, Wage Protection System (WPS) files, and End of Service Benefits (EOSB) across Saudi and non-Saudi employees was handled manually, introducing significant compliance risk under Saudi Labour Law.
ZATCA e-invoicing mandate
The company relied on an external standalone utility for ZATCA Phase 1 QR codes, requiring double entry and preventing unified general ledger reporting.
Severe master data duplication
Years of unconstrained Excel data entry resulted in duplicate vendor and customer records, inconsistent Arabic/English naming conventions, and missing commercial registration, IBAN, and tax details.
Key Implementation Highlights
1 — Multi-Dimensional 4-Plan Analytic Accounting
To give leadership instantaneous clarity without burdening data-entry clerks, I built a 4-plan analytic accounting architecture that tags transactions automatically via backend rules. An isolated Admin Cost Pool keeps operational segment margins clean and free of arbitrary allocations.
| Analytic Plan | Granularity | Purpose |
|---|---|---|
| Segment | Trading, Manpower Contracting, Equipment Rental | Top-level P&L split per business line |
| Client / Contract | Specific customer agreements | Client-level gross margin analysis |
| Unit / Resource | Individual SKU or deployed employee | Exact unit economics (hourly cost vs. billing rate) |
| Project | Deliverables & work orders | Real-time tracking of direct POs, expenses, and labour |
2 — KSA Statutory Payroll & Localisation Engine
Configured Odoo 19's Saudi Payroll suite to eliminate manual payroll calculations and maintain strict compliance:
- GOSI & SANED: automated calculations for Saudi nationals (9.75% + 11.75% + 2% SANED) and expatriates, factoring in basic salary and housing allowances.
- WPS (Wage Protection System): automated generation of bank-ready SIF files directly from validated payslips, linked to verified employee IBANs.
- End of Service Benefits (EOSB): structured automated monthly accruals adhering to Saudi Labour Law for both Limited and Unlimited contract structures.
- Iqama & Muqeem lifecycle tracking: proactive alerts (30/60/90 days) for visa, passport, and Iqama renewals across all active personnel.
3 — Automated Migration Pipeline & Error Handling
To migrate master and historical data cleanly without corrupting the production database:
- Developed modular Python scripts using xmlrpc.client with strict dry-run modes.
- Implemented validation functions checking 10-digit Iqama numbers, IBAN formats, phone numbers, and duplicate tax IDs before committing any writes.
- Solved Odoo 19 native quirks—including isolated x_name_ar fields and customised QWeb views for seamless bilingual Arabic/English invoice rendering.
4 — Continuous Master Data Governance: Automated Weekly Cleanup Toolkit
Data migrations often decay within weeks if operational staff lack maintenance tools. To prevent data rot, I designed and deployed an automated Cleanup Toolkit for internal staff:
- One-click batch execution — built zero-CLI .bat launchers that non-technical accounting staff can run with a double-click.
- Heuristic & rule-based duplicate detection — generates automated review workbooks flagging potential duplicate vendors, customers, and products using fuzzy name matching and strict tax ID validation.
- Pre-flight snapshot safety — before executing any merge or archival in Odoo, the script captures a full JSON snapshot of all linked invoices, payments, and journal items.
- Safe native merging — integrated Odoo's native merge wizards to consolidate vendor records while guaranteeing that historical ledgers and audit trails remain 100% balanced.
Results & Measurable Impact
True segment-wise P&L
Management now views direct margins for Material Trading vs. Manpower Contracting with a single click, identifying underperforming contracts immediately.
Zero spreadsheet dependencies
Eliminated all external Excel ledgers; daily invoicing, purchasing, and bank reconciliations now happen entirely within Odoo 19.
Instant payroll & bank processing
Monthly payroll for 160+ employees reduced from 3 full days of manual spreadsheet reconciliation to a 1-hour review and WPS export.
Clean, governed master data
Merged and normalised vendor and customer records, standardising enterprise acronyms and tax references across all entities.
Audit-proof financial history
All historical transactions uploaded, reconciled with bank statements, and backed by comprehensive pre-flight JSON audit snapshots.
Key takeaways for ERP & transformation projects
- 1Automation rules beat manual entry. Requiring operational clerks to manually tag analytic dimensions causes high error rates. Encoding business logic into automated rules ensures pristine data.
- 2Data cleanliness is an ongoing system, not a milestone. Deploying a simple, non-technical maintenance toolkit ensures the ERP remains clean long after the consultant signs off.
- 3Safety snapshots are non-negotiable. When modifying transactional master data via APIs, always write automated pre-flight snapshot engines to ensure zero risk to posted financial books.
Migrating from spreadsheets or need a similar ERP build?