Odoo API Manager

A Dart/Flutter package to simplify interactions with Odoo's JSON-RPC API. It offers a structured and flexible API client to handle authentication, data operations (CRUD), and custom domain queries in a type-safe and reusable manner.

Features

  • Connect to Odoo backend using JSON-RPC.
  • Authentication and session management.
  • Domain model builders for querying.
  • Typed request and response models.
  • Parse and handle Odoo API responses.

Getting Started

Add the dependency in your pubspec.yaml:

dependencies:
  odoo_api_manager: <latest_version>

Usage

import 'package:odoo_api_manager/odoo_api_manager.dart';

final client = OdooClient(baseUrl: 'https://your-odoo-instance.com');
final response = await client.authenticate('db_name', 'user@example.com', 'password');

if (response.isSuccessful) {
  // Proceed with CRUD operations
}

Folder Structure

  • lib/odoo_api_manager.dart: Entry point of the package.
  • lib/src/models/: Contains request/response and domain models.
  • lib/src/odoo_client.dart: Handles main API communication logic.
  • lib/src/constants/: Contains enums and constants used across the client.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Libraries

odoo_api_manager