Odoo Data Import Tool
Migrate data from Odoo (v15-v17) to Arkan ERP using CSV files or a live XML-RPC connection.
Overview
The import tool supports a 5-phase migration process:
- Master Data — Accounts, journals, taxes, categories, UOMs
- Partners — Clients (customers) and vendors (suppliers)
- Products — Product catalog, variants, vendor pricing
- Inventory — Warehouses, locations, opening stock, lots
- Transactions — Journal entries, invoices, payments, sales orders, purchase orders
Import Workflow
1. Create a Session
POST /api/v1/import/sessions
{
"source": "odoo_csv",
"source_version": "17.0"
}The session tracks progress, errors, and Odoo-to-Arkan ID mappings.
2. Upload and Analyze CSV
Export data from Odoo (Settings → Technical → Database Structure → Export), then:
POST /api/v1/import/analyze
{
"csv_content": "id,name,code,account_type\n1,Cash,1001,asset_cash\n...",
"delimiter": ","
}The system auto-detects the Odoo model from column headers.
3. Validate
POST /api/v1/import/validate
{
"csv_content": "...",
"model": "account.account"
}Returns validation errors (missing required fields, duplicates, invalid formats).
4. Import
Import each model in dependency order:
POST /api/v1/import/sessions/{id}/import/accounts
{ "csv_content": "..." }
POST /api/v1/import/sessions/{id}/import/journals
{ "csv_content": "..." }
POST /api/v1/import/sessions/{id}/import/partners
{ "csv_content": "..." }
POST /api/v1/import/sessions/{id}/import/products
{ "csv_content": "..." }5. Validate Results
POST /api/v1/import/sessions/{id}/validateReturns:
- Record count audit per model
- Trial balance check (debits = credits)
- Referential integrity check (orphaned FK references)
- Open document summary (unpaid invoices, pending orders)
Odoo Live Connector
Connect directly to a running Odoo instance via XML-RPC:
POST /api/v1/import/odoo/connect
{
"url": "https://mycompany.odoo.com",
"database": "mycompany",
"username": "admin@example.com",
"password": "api-key-or-password"
}One-Click Extract and Import
POST /api/v1/import/odoo/extract-and-import
{
"url": "https://mycompany.odoo.com",
"database": "mycompany",
"username": "admin@example.com",
"password": "...",
"session_id": "uuid",
"model": "account.account",
"fields": ["id", "name", "code", "account_type"]
}Import Sequence
Follow this order to satisfy foreign key dependencies:
| Phase | Models | Depends On |
|---|---|---|
| 1 | Accounts, Journals, Taxes, Categories, UOMs | None |
| 2 | Clients, Vendors | Phase 1 |
| 3 | Products, Vendor Products, Price Lists | Phase 1-2 |
| 4 | Warehouses, Locations, Opening Stock, Lots | Phase 1-3 |
| 5 | Journal Entries, Invoices, Payments, Orders | Phase 1-4 |
Supported Models
| Odoo Model | Arkan Model | Notes |
|---|---|---|
account.account | AcctAccount | Type mapping: asset_receivable→asset, etc. |
account.journal | AcctJournal | Direct mapping |
account.tax | AcctTax | VAT/GST/withholding |
product.category | InvCategory | Hierarchical (parents first) |
uom.uom | InvUnitOfMeasure | Factor-based conversion |
res.partner | Client + Vendor | Split by customer_rank / supplier_rank |
product.template | InvProduct | Includes tracking, barcode, category |
product.supplierinfo | InvVendorProduct | Pricing, lead time, preferred vendor |
stock.warehouse | InvWarehouse | Code + name |
stock.location | InvLocation | Internal type only |
stock.quant | InvStockQuant | Opening stock by location |
stock.lot | InvLot | Lot number + expiration |
account.move | AcctMove | Posted entries only (invoices + journal entries) |
account.payment | AcctPayment | Posted + reconciled |
sale.order | SalesOrder | Confirmed orders (draft → SalesQuote) |
purchase.order | InvPurchaseOrder | State mapping |
UI Wizard
Access the import wizard in the web app at Settings → Import. The wizard provides:
- Session management (create, resume, view history)
- CSV file upload with delimiter selection
- Auto-model detection from headers
- Field preview with sample data
- Validation results with error table
- Import progress tracking
- Error details with Odoo ID references
Last updated on