Skip to content
pubscout

odoo_rpc

0.7.1, released a year ago by erp.co.ua

Odoo RPC Client library for Dart with session changes tracking via stream.

WASM-ready
$ flutter pub add odoo_rpc
Source repository

What it does

Allows Dart and Flutter apps to connect to Odoo backends, issue JSON-RPC requests, handle authentication, and track session changes via streams.

AI-written summary of version 0.7.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter or Dart application that communicates with an Odoo ERP backend.
  • You need to track session updates or handle expired sessions.

Skip it when

  • You are not using Odoo as your backend.
  • You need a general-purpose REST or GraphQL client without Odoo-specific RPC methods.

Strengths

  • Provides seamless integration with Odoo authentication and session management.
  • Supports cross-platform environments including mobile, desktop, and web.
  • Tracks session changes through streams.

Weaknesses

  • Web platform support requires specific CORS configuration on the Odoo server.
  • Limited strictly to Odoo ERP backend interactions.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

Add the dependency to pubspec.yaml and configure CORS headers on the Odoo server if targeting the web platform.

import 'package:odoo_rpc/odoo_rpc.dart';

main() async {
  final client = OdooClient('https://my-db.odoo.com');
  try {
    await client.authenticate('my-db', 'admin', 'admin');
    final res = await client.callRPC('/web/session/modules', 'call', {});
    print('Installed modules: \n' + res.toString());
  } on OdooException catch (e) {
    print(e);
    client.close();
  }
  client.close();
}

Alternatives

Packages that do the same job and could replace odoo_rpc.

Works with

Packages commonly used together with odoo_rpc: ones it builds on, ones built on it, and its own family.