pub struct Search {
pub database: String,
pub uid: OdooId,
pub password: String,
pub model: String,
pub domain: Vec<Value>,
pub offset: Option<u32>,
pub limit: Option<u32>,
pub order: Option<String>,
}
Expand description
Return the ids of records matching a domain
§Example
client.search(
"res.partner",
// domain
jvec![
["email", "=ilike", "%@example.com"],
["phone", "!=", false]
],
Some(0), // offset
Some(10), // limit
Some("create_date desc".into()), // order
).send()?;
See: odoo/models.py
Fields§
§database: String
The database name (auto-filled by OdooClient
)
uid: OdooId
The user id (auto-filled by OdooClient
)
password: String
The user password (auto-filled by OdooClient
)
model: String
The Odoo model
domain: Vec<Value>
The domain to search on
offset: Option<u32>
An optional offset, for paging
limit: Option<u32>
An optional limit
order: Option<String>
An optional ordering description
This corresponds roughly with PostgreSQL’s ORDER BY
clause, for example:
create_date desc, id asc, active asc
Trait Implementations§
Source§impl JsonRpcParams for Search
impl JsonRpcParams for Search
type Container<T> = OdooOrmContainer<Search>
type Response = SearchResponse
fn build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Source§impl OdooOrmMethod for Search
impl OdooOrmMethod for Search
Source§fn endpoint(&self) -> &'static str
fn endpoint(&self) -> &'static str
Describe the “ORM” method endpoint (e.g., “/web/session/authenticate”)
Source§fn method(&self) -> &'static str
fn method(&self) -> &'static str
Return the model method name (e.g., “read_group” or “create”)
Source§fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Build
self
into a full JsonRpcRequest
Auto Trait Implementations§
impl Freeze for Search
impl RefUnwindSafe for Search
impl Send for Search
impl Sync for Search
impl Unpin for Search
impl UnwindSafe for Search
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more