OdooClient class

Odoo client for making RPC calls.

Constructors

OdooClient(String baseURL, [OdooSession? sessionId, BaseClient? httpClient])
Instantiates OdooClient with given Odoo server URL. Optionally accepts sessionId to reuse existing session. It is possible to pass own httpClient inherited from http.BaseClient to override default one.

Properties

baseURL String
Odoo server URL in format proto://domain:port
getter/setter pair
frontendLang String
Language used by user on website. It may be different from OdooSession.userLang
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
httpClient ↔ BaseClient
HTTP client instance. By default instantiated with http.Client. Could be overridden for tests or custom client configuration.
getter/setter pair
inRequestStream Stream<bool>
Returns stream of inRequest events
no setter
inRequestStreamDone Future
no setter
loginStream Stream<OdooLoginEvent>
Returns stream of login events
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionId OdooSession?
Returns current session
no setter
sessionStream Stream<OdooSession>
Returns stream of session changed events
no setter

Methods

authenticate(String db, String login, String password) Future<OdooSession>
Authenticates user for given database. This call receives valid session on successful login which we be reused for future RPC calls.
callKw(dynamic params) Future
Calls any public method on a model.
callRPC(dynamic path, dynamic funcName, dynamic params) Future
Low Level RPC call. It has to be used on all Odoo Controllers with type='json'
checkSession() Future
Checks if current session is valid. Throws OdooSessionExpiredException if session is not valid.
close() → void
Frees HTTP client resources
destroySession() Future<void>
Destroys current session.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited