Technical Specification
Project: SmartBill → Odoo Integration
Goal: SmartBill remains the legal accounting system for Romania, while Odoo becomes the main operational ERP for websites, marketing, sales operations, warehouses, POS, configuration, and consolidated management reporting.
1. Business Background
The company uses SmartBill as the primary accounting and compliance system in Romania. SmartBill must remain the system of record for statutory accounting, invoices, supplier bills, payments, receipts, and Romanian reporting requirements.
The company uses Odoo as the main operational ERP for:
- website and e-commerce integrations,
- marketing integrations,
- sales operations,
- warehouse and inventory operations,
- POS and operational processes,
- management dashboards and analytics.
The purpose of this project is to ensure that all accounting-relevant data created in SmartBill is synchronized into Odoo without duplication, so that management can see consolidated reports across the business structure and in the future across multiple warehouses and companies in other European countries.
2. Core Principle
- SmartBill = source of truth for accounting and legal/compliance data
- Odoo = source of truth for operational processes and consolidated management reporting
The integration must not break this principle.
3. Required Architecture
The preferred implementation is:
SmartBill API → Odoo.sh custom module → Odoo ORM
A custom module in Odoo.sh is preferred over a Make-only scenario because the module can better handle:
- field mapping,
- validation,
- duplicate prevention,
- logging,
- retries,
- future maintenance.
4. Project Scope
Phase 1 – Mandatory
The first production version must synchronize the following entities from SmartBill into Odoo:
- Products
- Customers / Partners
- Customer Invoices
- Invoice Lines
- Supplier Invoices / Vendor Bills
- Payments
- Receipts / payment references
- Workpoints / stores / locations used for accounting attribution
Phase 2 – Optional / Next Stage
- Stock movements
- More advanced warehouse logic
- Optional reverse synchronization of selected operational master data from Odoo to SmartBill
5. Main Functional Requirements
5.1 Products
The integration must create or update products in Odoo using SmartBill data.
Typical mapping:
- SmartBill product ID → x_smartbill_id
- code / SKU → default_code
- name → name
- category → categ_id
- unit → uom_id
- sale price → list_price
- VAT rate → taxes_id
- active status → active
5.2 Customers / Partners
The integration must create or update partners in Odoo using SmartBill data.
Typical mapping:
- SmartBill customer ID → x_smartbill_id
- company / full name → name
- tax ID / fiscal code → vat
- trade register number → company_registry
- email → email
- phone → phone
- country / city / address / zip → standard partner fields
5.3 Customer Invoices
SmartBill customer invoices must be synchronized into Odoo as account.move with move_type = out_invoice.
Mandatory data:
- SmartBill invoice ID
- Contract
- invoice series and number
- issue date
- due date
- customer
- currency
- untaxed amount
- tax amount
- total amount
- status
- remarks / notes
- workpoint / store reference
5.4 Invoice Lines
Each invoice line must be imported and linked to the correct invoice.
Mandatory data:
- SmartBill line ID, if available
- product
- description
- quantity
- unit
- unit price
- discount
- VAT rate
- subtotal
- total
5.5 Supplier Invoices
Supplier invoices must be imported into Odoo as account.move with move_type = in_invoice.
5.6 Payments and Receipts
Payments must be synchronized into Odoo as account.payment and linked to the relevant invoice when possible.
Exchange rates must be imported to calculate the book value of foreign products.
The solution should support reconciliation logic so that management reporting in Odoo reflects payment status correctly.
6. Duplicate Prevention and Idempotency
This is a critical requirement.
The integration must prevent duplicates by storing SmartBill identifiers inside Odoo records.
At minimum:
- x_smartbill_id
- x_smartbill_line_id
- x_smartbill_series
- x_smartbill_number
- x_smartbill_company_vat_code
Re-running the same synchronization window must not create duplicate records.
7. Tax Mapping
SmartBill VAT rates must be mapped to Odoo account.tax.
The developer must implement a configurable tax mapping layer:
8. Synchronization Logic
The system must support:
Full Re-Sync
Manual re-import for a selected date range without creating duplicates.
9. Logging and Error Handling
The module must include:
- sync job logs,
- error logs,
- retry mechanism,
- rate limiting protection,
- admin visibility inside Odoo.
User must be able to see:
- last successful sync,
- failed records,
- reason of failure,
- retry status.