Odoo API Integration in C#

Job ID: 39296348

Budget: €250 – €750 EUR

? Goal
Develop a reliable, bidirectional integration module for Odoo that enables:
1. Reading shipping statuses (including tracking numbers) from Odoo.
2. Writing orders into Odoo from the middleware.
3. Reading and updating product prices and stock levels.
4. Full communication via the official Odoo JSON-RPC API.
5. User control through a graphical interface (GUI).
? Architectural Guidelines
- The module is named `OdooConnector`.
- It does NOT inherit from `MarketplaceConnector` (independent logic).
- Communication is strictly via Odoo’s JSON-RPC API (no direct DB access).
- Standard DTOs are used: ProductDto, OrderDto, ShippingStatusDto.
- Internal helper classes (OdooApiClient, models) are allowed.
- All processes must be fault-tolerant and log-friendly.
? Data Flow & API Usage
- Products: read & update via `product.product` and `product.template`.
- Orders: created via `sale.order` and `sale.order.line`.
- Shipping: read from `stock.picking` (tracking number, delivery state).
? JSON-RPC API Access Example
POST http://<ODOO-SERVER>/jsonrpc
Content-Type: application/json

{
"jsonrpc": "2.0",
"method": "call",
"params": {
"service": "common",
"method": "login",
"args": ["my-db", "username", "password"]
},
"id": 1
}
? Main Class: OdooConnector
Required methods:
- List<ShippingStatusDto> GetShippingStatus()
- bool SubmitOrder(OrderDto order)
- List<ProductDto> GetProductData()
- bool UpdateProductData(ProductDto product)
- bool TestConnection()
?️ GUI: Odoo Configuration & Testing
The GUI allows the user to:
- Manage access credentials (server, DB, username, password)
- Test connection to Odoo
- Perform manual test operations (fetch or push data)
- Configure rules (e.g., category filters, price markup)
GUI Fields:
- Server URL
- Database name
- Username
- Password (encrypted)
- Price markup (%)
- Category filter (optional)
- Sync mode: Read-only / Read & Write
- Connection test button
? Example Configuration Class
public class OdooConfig
{
public string ServerUrl { get; set; }
public string Database { get; set; }
public string Username { get; set; }
public string PasswordEncrypted { get; set; }
public int PriceMarkupPercent { get; set; }
public List<string> CategoryFilter { get; set; }
}
? Recommended Internal Classes
- OdooApiClient: Handles JSON-RPC requests
- OdooProductModel: Represents Odoo’s product structure
- OdooOrderModel: Structure for creating orders in `sale.order`
- OdooShippingModel: Parses shipping info from `stock.picking`
- OdooConfig: Settings class for the GUI
? Deliverables
- `OdooConnector.cs`: Main integration logic
- `Api/OdooApiClient.cs`: JSON-RPC communication
- `Models/OdooProductModel.cs`: Product DTO
- `Models/OdooOrderModel.cs`: Order DTO
- `Models/OdooShippingModel.cs`: Shipping DTO
- `GUI/OdooSettingsView.xaml`: WPF settings interface
- `Config/OdooConfig.cs`: Serializable config
- `README.md`: Setup and API reference
✅ Summary
- Provides bidirectional integration with Odoo using JSON-RPC.
- Orders are pushed from the middleware to Odoo.
- Shipping statuses including tracking are pulled from Odoo.
- Stock and pricing are synced both ways.
- GUI allows full user control and testing options.
- Fully fault-tolerant and ready for use in a production middleware system.