Cenit Integrations Client allows you to integrate your Odoo system with many third party services available over the internet using the Cenit.io platform as data integrator.
- The Cenit.io platform provides a set of models that allow you to map your data once and send it transparently to any service supported by the platform.
- The Cenit.io platform is free and community friendly, and makes use of open source and standards so that community driven development is easier.
The Cenit Integrations Client requires a few additional Python packages to be installed on your system. These dependencies can be easily installed using pip as follows:
$ pip install inflect
$ pip install requests[security]
If not using pip you should manually install the following Python packages:
inflectpyOpenSSLndg-httpsclientpyasn1
Actual package names depend on your specific system.
The Cenit Integrations Client groups its provided models in two categories describing what data you want to be able to send/receive and when you want to send/receive the data.
The models gathered here describe the what, they manipulate the Odoo data to shape it in a way that is consistent with supported third party services.
Libraries are a mere logical organization of the data. They exist solely for the purpose of organizing Schemas and Data types.
-
name: stringThe name of the Library.
Must be unique.
-
slug: stringA sanitized string containing only lower case alphanumeric characters and underscores.
It identifies the Library and must therefore be unique.
Schemas are the fundamental stone of the cenitsaas_ platform models. They
define the way data is stored and transmitted.
-
library: referenceThe Library to which the Schema belongs.
-
name: stringThe name of the Schema.
Must be unique for each Library.
-
slug: stringA sanitized string containing only lowercase alphanumeric characters and underscores.
Must be unique for each Library.
-
schema: stringThe actual JSON schema describing the data.
Data types represent a mapping between an existing Odoo model and a Schema.
-
name: stringThe name of the Data type.
-
model: referenceThe Odoo model that will by associated with the Data type.
-
library: referenceThe Library to which the Data type belongs.
-
schema: referenceThe Schema against which the
modelwill be mapped. -
enabled: booleanIf unchecked the Data type will be stored but won't trigger any event. This is most useful when the mapping is intended to be used embedded from another Data type.
-
mapping: structureDescribes how to translate the
modelto theschema. It consists of a series of mapping lines, describing whichmodeldata should go into whichschemaproperty.-
name: stringthe name of the
schemaproperty that will store the value expressed invalue. -
value: stringrepresents an actual value to use, depending on the
type. -
type: one of-
Field: tells the Data type that the value expressed invalueis the name of a field in themodel(say name). This does not allow using nested fields (that is: rel_id.name will cause breakdown). -
Model: tells the Data type that the value expressed invalueis a reference to other Data type. This means that when sending/receiving the data, the related Odoo model will also be serialized/deserialized (according to the specifiedreference) and fully processed as if it were the one that triggered the action. -
Reference: tells the Data type that the value expressed invalueis a reference to other model not mapped by any Data type. In this case the field name of the related model is used as an identifier. -
Default: tells the Data type that the value expressed invalueshould be treated as a string literal, which can contain replacement patterns in the form of {field_name} where field_name is the name of a field in themodel.This form does allow the use of nested fields (e.g: {rel_id.name}), and also can be a json structure, in which case the JSON brackets should be doubled: {{ and }} (e.g: {{client: "{client.name}"}}).
-
Python code: tells the Data type that the value expressed invalueshould be evaluated (it is actually processed by a call to Python's eval builtin function). The special variable obj refers to the object being mapped.
-
-
reference: referenceused when
typeis Model.This refers to a Data type against which the
valueis mapped. -
cardinality: one of-
2one: thevaluerepresents a single object. -
2many: thevaluerepresents a list of objects.
used when
typeis Model or Reference. -
-
primary: if checked, the field will be used as an identifier when receiving data.
-
-
triggers: one of-
On creation: every time an instance ofmodelis created on Odoo, a serialization toschemawill be performed. -
On update: every time an existing instance ofmodelis modified in Odoo, a serialization toschemawill be performed. -
On creation or update: every time instance ofmodelis created or modified, a serialization toschemawill be performed. -
On interval: every 10 minutes all instances ofmodelwill be serialized toschema. -
Only manually: serialization will only be performed when specifically requested to Odoo.
-
-
Conditions: structure-
field: stringThe name of a field in
model. -
condition: one of-
Equal: the value offieldfor the instance ofmodelbeing serialized must be equal tovalue. -
Different: the value offieldfor the instance ofmodelbeing serialized must be different thanvalue. -
In: the value offieldfor the instance ofmodelbeing serialized must be present invalue. -
Not in: the value offieldfor the instance ofmodelbeing serialized must not be present invalue.
-
-
value: stringIf
conditionis one ofInorNot in,valuewill be splitted by commas to form a list
-
- Fork the repository on Github.
- Create a branch off 8.0
- Make your changes
- Write a test which shows that the bug was fixed or that the feature works as expected.
- Send a pull request.
Copyright (C) 2014-2015 by CenitSaas Team <support [at] cenit [dot] io>
All rights reserved.
Cenit Integrations Client is licensed under the LGPL license. You can
redistribute and/or modify the Cenit Integrations Client according to the
terms of the license.