pub struct CreateDatabase {
pub passwd: String,
pub db_name: String,
pub demo: bool,
pub lang: String,
pub user_password: String,
pub login: String,
pub country_code: Option<String>,
pub phone: Option<String>,
}
Expand description
Create and initialize a new database
Note that this request may take some time to complete, and it’s likely worth only firing this from an async-type client
§Example
let resp = client.db_create_database(
"master-password",
"new-database-name",
false, // demo
"en_GB", // lang
"password1",// user password
"admin", // username
Some("gb".into()), // country
None // phone
).send()?;
Reference: odoo/service/db.py
Fields§
§passwd: String
The Odoo master password
db_name: String
The name for the new database
demo: bool
Should demo data be included?
lang: String
What language should be installed?
This should be an “ISO” formatted string, e.g., “en_US” or “en_GB”.
See also: ListLang
user_password: String
A password for the “admin” user
login: String
A login/username for the “admin” user
country_code: Option<String>
Optionally specify a country
This is used as a default for the default company created when the database is initialised.
See also: ListCountries
phone: Option<String>
Optionally specify a phone number
As with country_code
, this is used as a default for the newly-created
company.
Trait Implementations§
Source§impl Debug for CreateDatabase
impl Debug for CreateDatabase
Source§impl JsonRpcParams for CreateDatabase
impl JsonRpcParams for CreateDatabase
type Container<T> = OdooApiContainer<CreateDatabase>
type Response = CreateDatabaseResponse
fn build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Source§impl OdooApiMethod for CreateDatabase
impl OdooApiMethod for CreateDatabase
Source§fn describe(&self) -> (&'static str, &'static str)
fn describe(&self) -> (&'static str, &'static str)
Describe the JSON-RPC service and method for this type
Source§fn endpoint(&self) -> &'static str
fn endpoint(&self) -> &'static str
Describe method endpoint (e.g., “/web/session/authenticate”)
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 CreateDatabase
impl RefUnwindSafe for CreateDatabase
impl Send for CreateDatabase
impl Sync for CreateDatabase
impl Unpin for CreateDatabase
impl UnwindSafe for CreateDatabase
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