Odoo
class Odoo (View source)
Properties
string | $common | Common client | |
string | $object | Object client | |
protected integer | $uid | Odoo User identifier | |
protected string | $db | DB Name | |
protected string | $host | Host Name | |
protected string | $username | DB Username | |
protected string | $password | DB Password | |
protected string | $suffix | API host suffix | |
protected string | $commonEndPoint | Common endpoint meta-calls which don't require authentication | |
protected string | $objectEndPoint | Object endpoint | |
protected array | $condition | Where Condition | |
protected integer | $offset | Offset | |
protected integer | $limit | Limit available to only retrieve a subset of all matched records | |
protected array | $fields | fields to be requested |
Methods
Create a new Odoo instance
Login to Odoo ERP.
Check access rights on a model.
Set condition for search query
Limit helps to only retrieve a subset of all matched records second parameter, offset to start from that value.
Set fields to retrieve.
Get the ids of the models.
Count the items in a model's table.
Get a list of records.
Retrieve Odoo version.
Get a collection of fields of a model table.
Create a single record and return its database identifier.
Update one or more records.
Remove a record by Id or Ids.
Remove one or a group of records.
Run execute_kw call with provided params.
Get a XML-RPC client
Set host
Set username
Set password.
Set db name.
Set API suffix.
Get the Odoo user identifier
Get host
Get db
Get username
Get password
Details
at line 128
__construct()
Create a new Odoo instance
at line 149
$this
connect(string $db = null, string $username = null, string $password = null, array $array = [])
Login to Odoo ERP.
at line 171
string|true
can(string $permission, string $model, bool $withExceptions = false)
Check access rights on a model.
return true or a string with the error.
at line 191
$this
where(string $field, string $operator, string $value = null)
Set condition for search query
at line 212
$this
limit(int $limit, int $offset)
Limit helps to only retrieve a subset of all matched records second parameter, offset to start from that value.
at line 226
$this
fields(array $fields)
Set fields to retrieve.
at line 240
Collection
search(string $model)
Get the ids of the models.
at line 264
integer
count(string $model)
Count the items in a model's table.
at line 286
Collection
get(string $model)
Get a list of records.
at line 316
Collection|string
version(string $key = null)
Retrieve Odoo version.
If key passed it returns the key value of the collection No need authentication
at line 331
Collection
fieldsOf(string $model)
Get a collection of fields of a model table.
at line 348
integer
create(string $model, array $data)
Create a single record and return its database identifier.
at line 367
true|string
update(string $model, array $data)
Update one or more records.
returns true except when an error happened.
at line 394
true|string
deleteById(string $model, array|Collection|int $id)
Remove a record by Id or Ids.
returns true except when an error happened.
at line 414
true|string
delete(string $model)
Remove one or a group of records.
returns true except when an error happened.
at line 435
Collection
call($params)
Run execute_kw call with provided params.
at line 454
Ripcord_Client
getClient(string $endPoint)
Get a XML-RPC client
at line 478
$this
host($url)
Set host
at line 491
$this
username(string $username)
Set username
at line 504
$this
password(string $password)
Set password.
at line 517
$this
db(string $name)
Set db name.
at line 530
$this
apiSuffix($name)
Set API suffix.
at line 554
integer
getUid()
Get the Odoo user identifier
at line 564
string
getHost()
Get host
at line 574
string
getDb()
Get db
at line 584
string
getUserName()
Get username
at line 594
string
getPassword()
Get password