pub struct ExecuteKw { /* private fields */ }
Expand description
Call a business-logic method on an Odoo model (positional & keyword args)
Service: object
Method: execute_kw
Request: ExecuteKw
Response: ExecuteKwResponse
This method is very similar to execute
; It allows you to call an arbitrary
Odoo method (e.g. read
or create
or my_function
), passing some arbitrary
data, and returns the result of that method call.
This differs from execute
in that keyword args (kwargs
) can be passed.
Example:
use odoo_api::types::object;
use serde_json::json;
let request = object::execute_kw(
"my-database",
1, // admin user
"password1",
"res.users",
"read",
json!([]),
json!({
"limit": 5,
})
);
Reference: odoo/service/model.py
Trait Implementations§
source§impl<'de> Deserialize<'de> for ExecuteKw
impl<'de> Deserialize<'de> for ExecuteKw
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl OdooApiMethod for ExecuteKw
impl OdooApiMethod for ExecuteKw
§type Response = ExecuteKwResponse
type Response = ExecuteKwResponse
The response type (e.g., the
ExecuteResponse
for Execute
)source§fn describe_odoo_api_method(&self) -> (&'static str, &'static str)
fn describe_odoo_api_method(&self) -> (&'static str, &'static str)
Describes the Odoo API method (including the service) Read more
source§fn parse_json_response(&self, json_data: &str) -> Result<OdooApiResponse<Self>>
fn parse_json_response(&self, json_data: &str) -> Result<OdooApiResponse<Self>>
Parse some JSON string data into an
OdooApiResponse
object Read more