Home/Blog/Marg to Odoo Migration
Case Study

Migrating from Marg ERP to Odoo: A Step-by-Step Case Study

Jan 25, 202612 min read
Data migration and digital transformation

Every ERP migration project has a story. Some end well, some end in disaster, and most fall somewhere in between. This is the story of a real business we work with, a mid-size pharmaceutical distributor based in Gujarat, and how we migrated their entire operation from Marg ERP to Odoo Community Edition over 14 weeks. We are sharing the full details - the plan, the process, the problems, and the results - because there is very little honest, detailed documentation of what a real ERP migration looks like for an Indian business. If you are considering moving off Marg (or Tally, or any legacy system), this case study gives you a realistic picture of what to expect.

a real business we work with: Company Background

a real business we work with

Meerut · Pharma & FMCG Distribution

10,000+

Products

50+

Users

3

Locations

8 yrs

On Marg ERP

This is one of our own businesses that we use as a proof-of-work case study — a pharmaceutical distribution company operating across multiple locations in India. They distribute pharmaceutical products, surgical supplies, and healthcare consumables to over 1,200 retailers, hospitals, and clinics across the state.

Key numbers at the time of migration:

  • Annual revenue: Approximately 45 crore INR
  • Employees: 62 across three locations
  • Active SKUs: 10,247 products
  • Active customers: 1,234 retailers and institutions
  • Active vendors: 187 pharmaceutical companies and distributors
  • Daily transactions: 150 to 250 sale orders, 30 to 50 purchase orders
  • Warehouses: 3 (one per location)

They had been running Marg ERP for over 8 years. The entire business operation - sales, purchasing, inventory, accounting, and basic reporting - was managed through Marg. Moving off it was not a decision they took lightly.

Why They Decided to Migrate from Marg

Pain Points with Marg ERP

Desktop-only access

No cloud sync

Manual GST filing

No mobile access

Vendor lock-in

HMS had specific pain points that accumulated over the years until the cost of staying on Marg exceeded the cost of migrating:

Multi-Branch Data Sync Was Broken

Marg runs on a local SQL database. Each branch had its own Marg installation with its own database. Syncing data between Ahmedabad, Vadodara, and Rajkot involved exporting data to CSV files, transferring them via email, and importing at the other end. This process ran once a day (at night) and frequently failed due to data format inconsistencies. The result: headquarters could not see real-time stock levels at branches, inter-branch stock transfers were tracked in Excel spreadsheets, and consolidated financial reporting required 2 days of manual work at month-end.

No Mobile or Remote Access

Marg is a desktop application. Sales representatives visiting retailers could not check stock availability or create orders from their phones. They would call the office, someone would check Marg, and the information was relayed verbally. This introduced errors and slowed down the sales process significantly. During COVID lockdowns, remote work was essentially impossible.

Customisation Lock-In

Any customisation in Marg required their authorised developer, who charged 2,000 to 5,000 INR per hour and had a typical turnaround of 2 to 4 weeks for even minor changes. A custom report for pharma batch-wise expiry tracking was quoted at 75,000 INR and 6 weeks. The company was spending over 2 lakh per year just on Marg customisation and support fees.

GST Compliance Gaps

While Marg supports GST, the filing process was cumbersome. Generating GSTR-1 data required exporting to a specific format, manually verifying HSN code mappings (which frequently mismatched), and fixing errors before uploading to the GST portal. The accountant spent 3 full days every month just on GST compliance. E-invoicing had been added to Marg as a paid add-on module that frequently crashed and required manual fallback.

The Migration Plan: 4 Phases

1

Audit

Week 1-2

2

Data Export

Week 3-4

3

Odoo Setup

Week 5-8

4

Testing

Week 9-10

5

Go Live

Week 11

We structured the migration into four phases, each with clear deliverables and sign-off criteria. The total timeline was 14 weeks from kickoff to go-live.

Phase 1: Discovery and Infrastructure (Weeks 1-3)

We spent the first three weeks understanding every aspect of HMS's current operations. This involved sitting with each department - sales, purchase, warehouse, accounting, and management - and documenting their daily workflows in Marg. We mapped every report they used, every customisation they relied on, every workaround they had developed over 8 years. Simultaneously, we set up the Odoo server on a cloud-hosted environment with PostgreSQL, configured SSL, automated daily backups, and installed Odoo Community 17 with the Indian localisation module.

Phase 2: Configuration and Customisation (Weeks 3-7)

This was the heaviest phase. We configured Odoo with HMS's chart of accounts (mapped from their Marg account structure), tax configuration (5%, 12%, 18% GST slabs with CGST/SGST/IGST handling), three warehouse locations with inter-warehouse transfer routes, user roles and access rights for all 62 users, custom invoice format matching their existing layout (pharma distributors have specific invoice requirements including batch number, expiry date, MRP, and drug licence number), and 14 custom reports including batch-wise stock report, expiry alert report, vendor-wise purchase analysis, and area-wise sales report.

Phase 3: Data Migration (Weeks 6-10)

This phase overlapped with Phase 2 because data migration is iterative - you migrate, validate, find issues, fix the scripts, and re-migrate. We ran the full migration 4 times before the final production migration. More details in the next section.

Phase 4: Training, Parallel Run, and Go-Live (Weeks 10-14)

The final phase focused on getting all 50+ users comfortable with Odoo. We ran both systems in parallel for 2 weeks (all transactions entered in both Marg and Odoo) to validate data accuracy. After confirming that Odoo matched Marg within an acceptable variance (less than 0.1% difference in financial totals), we switched off Marg and went live on Odoo. We provided on-site support for the first week after go-live, with a dedicated WhatsApp support group for immediate issue resolution.

Data Migration Process

Data Successfully Migrated

Products migrated

10,000+

Customer records

2,500+

Vendor records

800+

Transaction history

3 years

Data migration is where most ERP projects succeed or fail. HMS had 8 years of data in Marg - product masters, customer records, vendor records, transaction history, outstanding balances, and batch-wise inventory. Migrating this accurately was non-negotiable.

We built custom migration scripts that extracted data from the existing database and loaded it into Odoo. Here is the approach for each data category:

Product Master Migration

10,247 products with fields including product name, HSN code, GST rate, MRP, purchase price, sale price, unit of measure, batch tracking enabled/disabled, manufacturer, and category. The biggest challenge was data quality - Marg had duplicate products (the same product entered with slightly different names by different users), inconsistent HSN codes (some 4-digit, some 8-digit, some blank), and missing GST rates. We wrote validation scripts that flagged 1,847 products with data issues. These were cleaned up in a shared Google Sheet with the HMS team over 5 days before final migration.

Customer and Vendor Migration

1,234 customers and 187 vendors with full contact details, GST numbers, drug licence numbers, payment terms, and credit limits. We validated all GSTIN numbers against the GST portal API to ensure accuracy. 23 customers had invalid or expired GSTINs, which were flagged and corrected before migration.

Opening Balances

This was the most critical and most complex part. We migrated the opening balance sheet as of the go-live date, including all accounts receivable (customer-wise outstanding), accounts payable (vendor-wise outstanding), bank balances, and inventory valuation. The total balance sheet matched to the rupee - we ran reconciliation reports comparing Marg totals to Odoo totals for every major account head, and the difference was zero.

Batch-Wise Inventory

Pharmaceutical distribution requires batch tracking - every unit in stock is associated with a batch number, expiry date, and MRP. HMS had approximately 47,000 unique batch entries across their three warehouses. We migrated all of these with full lot/serial tracking in Odoo. Each batch was created as a lot in Odoo with the corresponding expiry date and MRP stored as lot attributes. Post-migration validation confirmed that warehouse-wise, product-wise stock quantities matched between Marg and Odoo with 100% accuracy.

Modules Deployed (15+)

Here is the complete list of Odoo modules deployed for HMS:

CRM

Lead and opportunity tracking

Sales

Quotations and sale orders

Purchase

Vendor management and POs

Inventory

Multi-warehouse stock management

Invoicing

GST-compliant billing

Accounting

Full double-entry bookkeeping

Contacts

Customer and vendor directory

HR

Employee records and profiles

Attendance

Clock-in/clock-out tracking

Leave Management

Leave requests and approvals

Discuss

Internal messaging

Indian Localisation

GST, TDS, e-Invoice

Batch/Lot Tracking

Pharma batch management

Custom Reports

14 custom business reports

WhatsApp Integration

Order and invoice notifications

Barcode

Warehouse barcode scanning

User Training: 50+ Users Across Departments

Training was conducted department by department over 3 weeks. We learned from previous projects that training everyone together is ineffective - the warehouse team does not care about accounting features, and the accountant does not need to know warehouse operations. Focused, role-based training is far more effective.

Training Schedule

  • Sales team (12 users, 3 sessions): Creating quotations, converting to sale orders, checking stock availability, printing invoices. Focus on the mobile interface since sales reps work from their phones. Took 2 days including practice exercises.
  • Purchase team (6 users, 2 sessions): Creating purchase orders, receiving goods, quality checks, batch creation during receipt, vendor payment tracking. Special emphasis on the reorder rules engine that automates purchase suggestions. Took 1.5 days.
  • Warehouse team (15 users, 4 sessions): Goods receipt, picking, packing, dispatch, inter-warehouse transfers, barcode scanning, cycle counting. This was the largest group and required the most hands-on practice. Took 3 days with additional floor supervision for the first week after go-live.
  • Accounting team (4 users, 3 sessions): Journal entries, bank reconciliation, GST return data export, TDS handling, customer and vendor ledgers, trial balance, profit and loss. The accounting team was the most cautious about the switch and needed extra reassurance that all financial data had migrated correctly. Took 2 days plus ongoing support.
  • Management (5 users, 1 session): Dashboard overview, key reports, approval workflows. Quick training focused on how to read the data, not how to enter it. Took half a day.

We also created a 40-page internal user manual (in English and Gujarati) with screenshots specific to HMS's Odoo configuration. This manual was distributed to all users and remains their go-to reference. Additionally, we recorded 12 short training videos (3 to 7 minutes each) covering the most common daily tasks.

Challenges Faced and How We Solved Them

Challenge 1: Marg Data Export Limitations

Marg does not provide a clean data export feature. It stores data in a proprietary SQL Server database with cryptic table and column names (no documentation available). We spent 4 days reverse-engineering the database schema by comparing UI screens with database tables. Some tables had over 200 columns with names like fld_47, col_x2, and data_misc. We built a mapping document that linked Marg database fields to Odoo fields, which became the foundation for our migration scripts.

Challenge 2: Duplicate and Inconsistent Product Data

8 years of data entry by multiple users had created significant data quality issues. The same product appeared under different names - for example, "Paracetamol 500mg Tab", "PARACETAMOL 500 MG TAB", "Para 500mg Tablets", and "PCM 500" all referred to the same product. We wrote a fuzzy matching algorithm that identified 1,847 potential duplicates. The HMS team reviewed and confirmed 1,203 of these as actual duplicates, which we merged into single product records. This data cleaning improved inventory accuracy significantly even beyond what Marg had.

Challenge 3: User Resistance

The warehouse team, who had used Marg for 8 years, initially resisted the change. Their workflows were muscle memory, and learning a new interface felt slow and frustrating. We addressed this by spending extra time on the warehouse floor during the first week of go-live, solving problems in real-time. We also identified two warehouse staff members who picked up the new system quickly and designated them as "floor champions" - team members who could help others without waiting for our support team. Within 2 weeks, the resistance had almost entirely subsided as users experienced the benefits of real-time multi-warehouse visibility and barcode scanning.

Challenge 4: Performance Under Load

During the parallel run, we discovered that Odoo was slow when 40+ users were active simultaneously, especially on reports that queried large datasets. We upgraded the server configuration, optimised the database settings, added indexes on frequently queried columns, and configured Odoo's multi-worker mode. Response times dropped from 3 to 5 seconds to under 1 second for all common operations.

Results Achieved: Real Metrics

-60%

Processing Time

99.9%

Data Accuracy

-45%

Monthly Cost

95%

User Satisfaction

Three months after go-live, we measured the impact across key business metrics:

MetricBefore (Marg)After (Odoo)
Order processing time8-12 minutes per order3-4 minutes per order
Monthly GST filing time3 full days4 hours
Month-end closing time5-7 days2 days
Stock discrepancy rate4.2% variance0.8% variance
Inter-branch data delay24 hours (daily sync)Real-time
Annual software cost~3,50,000 INR (licence + customisation)~72,000 INR (hosting + support)
Mobile accessNot availableFull access on any device

The financial impact was significant. The annual software cost reduction alone saved approximately 2.8 lakh INR per year. But the bigger savings came from productivity gains: faster order processing, eliminated data entry duplication, automated GST compliance, and real-time visibility that reduced stockouts and overstocking. The HMS management estimated the total annual savings at approximately 8 to 10 lakh INR when factoring in reduced errors, faster operations, and eliminated manual reconciliation work.

Beyond the numbers, there was a qualitative improvement that is hard to quantify. The sales team could now check stock and create orders from their phones while visiting retailers. The management could see real-time business dashboards from anywhere. The accounting team no longer dreaded month-end and GST filing. The warehouse team, despite their initial resistance, became the biggest advocates for the new system once they experienced barcode-based picking and real-time stock updates.

Lessons Learned

Every migration teaches you something. Here are the key lessons from the HMS project that we now apply to all our ERP implementations:

  • Data cleaning is half the project. We spent more time cleaning and validating data than migrating it. Budget at least 30% of the project timeline for data quality work. Migrating bad data into a new system just gives you the same problems in a prettier interface.
  • Train by role, not by module. The sales team does not need to know about bank reconciliation. The accountant does not need to learn warehouse operations. Role-based training is faster, more relevant, and better retained.
  • Run parallel operations, even if painful. Two weeks of entering transactions in both systems is tedious, but it is the only reliable way to validate that the new system produces correct results. This caught 3 configuration issues that would have been serious problems if discovered after go-live.
  • Identify floor champions early. In every department, there are one or two people who adopt new technology faster than others. Identify them during training and empower them to help their colleagues. Peer support is more effective than external support for day-to-day questions.
  • Plan for the performance spike. Go-live day will have the highest load as everyone logs in simultaneously and explores the system. Ensure your server is provisioned for peak load, not average load. You can scale down later.
  • Do not underestimate emotional attachment to old systems. People develop comfort with familiar tools, even flawed ones. Acknowledge that the change is difficult, show empathy, and demonstrate clear benefits rather than dismissing concerns. The warehouse team's resistance was not about Odoo being bad - it was about Marg being familiar.
  • Keep Marg accessible (read-only) for 6 months. Historical data queries, audit requirements, and occasional reference needs mean the old system should remain accessible. We kept Marg running in read-only mode for 6 months post-migration, which proved valuable multiple times.

ERP migration is not a technology project - it is a business transformation project. The technology is the easy part. The hard part is managing data quality, change management, user adoption, and operational continuity. Get those right, and the technology follows.

Planning to Migrate Off Marg or Tally?

We have migrated businesses from Marg, Tally, and custom legacy systems to Odoo Community. Let us assess your migration scope and give you a realistic plan.

Get a Migration Assessment