pub struct SearchRead {
pub database: String,
pub uid: OdooId,
pub password: String,
pub model: String,
pub domain: Vec<Value>,
pub fields: Vec<String>,
pub offset: Option<u32>,
pub limit: Option<u32>,
pub order: Option<String>,
}Expand description
Perform a search and read in one call
§Example
client.search_read(
"res.partner",
// domain
jvec![
["email", "=ilike", "%@example.com"],
["phone", "!=", false]
],
// fields
svec!["id", "name", "email", "phone"],
Some(0), // offset
Some(10), // limit
Some("create_date desc".into()), // order
).send()?;
See: odoo/models.py
Fields§
§database: StringThe database name (auto-filled by OdooClient)
uid: OdooIdThe user id (auto-filled by OdooClient)
password: StringThe user password (auto-filled by OdooClient)
model: StringThe Odoo model
domain: Vec<Value>The domain to search on
fields: Vec<String>The fields to read
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 Debug for SearchRead
impl Debug for SearchRead
Source§impl JsonRpcParams for SearchRead
impl JsonRpcParams for SearchRead
type Container<T> = OdooOrmContainer<SearchRead>
type Response = SearchReadResponse
fn build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Source§impl OdooOrmMethod for SearchRead
impl OdooOrmMethod for SearchRead
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 JsonRpcRequestAuto Trait Implementations§
impl Freeze for SearchRead
impl RefUnwindSafe for SearchRead
impl Send for SearchRead
impl Sync for SearchRead
impl Unpin for SearchRead
impl UnwindSafe for SearchRead
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