Provide a configurable, reusable client for Odoo XML-RPC API v2, supporting authentication, entity search, read, search_read, create/update/delete, and document-centric operations.
Expose higher-level, domain-oriented facades (e.g., Products/Transfers) to simplify business usage.
Map Odoo records to TourLinq canonical entities using annotated Java classes.
Write: create, write(id, entity), delete(id) using maps generated by entities.
Document: Provide OdooDocumentService for document or printout operations (e.g., reading binary fields or triggering server-side actions; details depend on configured action).
Entity Mapping
Each native entity extends OdooEntity and is annotated with @TlinqClientEntity("<canonicalClassFQN>").
Fields are annotated with @TlinqEntityField to define source Odoo field names, indexes for many2one tuples, readOnly flags, and mapping to canonical field names.
Native-to-canonical conversion is handled reflectively by OdooEntity (e.g., toCanonicalList, createCanonicalObject).
Caching
A cache manager (OdooCacheManager) initializes a global cache for transfers (XFERCACHE) using StaticMapCache.
Product/transfer lookup results (e.g., from OdooProductFacade) must be cached for fast domain operations.
Error Handling & Logging
Translate XML-RPC and reflection errors into TlinqClientException with TlinqErr categories.
Log failures and critical steps with java.util.logging.
Security
Credentials and tokens must be read from secure properties; tokens stored server-side (TlinqClusterCache).
Hostname verification is relaxed for localhost in OdooServiceFactory; production deployments should require strict HTTPS hostname verification.
Performance
Services should support pagination (offset, limit), field selection, and server-side ordering.
Batch read/write operations should be supported via arrays/lists of IDs.