Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthError ¶
type AuthError struct {
Message string
}
AuthError is returned when Odoo rejects the login credentials.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds an authenticated session to Odoo.
func NewSession ¶
NewSession connects to Odoo at url, authenticates with the given credentials, and returns a Client ready to make RPC calls.
type Condition ¶
Condition represents a single filter triple: (field, op, value). Op is a comparison operator such as "=", "!=", ">", "<", "ilike". This is distinct from Operator, which is a logical prefix operator.
func (Condition) MarshalJSON ¶
MarshalJSON serializes Condition as a JSON array [field, op, value].
type Domain ¶
type Domain []DomainNode
Domain is a list of DomainNodes used as a filter in Odoo RPC calls.
func ParseDomain ¶
ParseDomain parses an Odoo domain string into a Domain.
The input uses Python-style syntax with tuples and prefix operators:
[('is_company', '=', True)]
['|', ('name', 'ilike', 'foo'), ('name', 'ilike', 'bar')]
Supported Python literals: True, False, None, strings, integers, floats.
func (Domain) MarshalJSON ¶
MarshalJSON serializes Domain as a JSON array. A nil or empty Domain marshals to [] — never null. Odoo expects an empty array for an unrestricted domain, not null.
type DomainNode ¶
type DomainNode interface {
// contains filtered or unexported methods
}
DomainNode is either a Condition or an Operator.