2
.. i18n: OpenObject Server and Modules
3
.. i18n: =============================
5
OpenObject Server and Modules
6
=============================
8
.. i18n: * **OpenERP** is a `Client/Server <http://en.wikipedia.org/wiki/Client_server>`_ system that works over a IP Network.
9
.. i18n: * **OpenERP** programming language is Python.
10
.. i18n: * **OpenERP** uses Object-Oriented technologies.
11
.. i18n: * **OpenERP** records its data with a PostgreSQL relational database.
12
.. i18n: * **OpenERP** business objects are modeled with an Object Relational Mapping (ORM) system.
13
.. i18n: * **OpenERP** offers three Human Machine Interfaces (HMI) a GTK client, a QT client and a web client (eTiny).
14
.. i18n: * **OpenERP** uses ReportLab for report generation in (PDF).
15
.. i18n: * **OpenERP** uses XML for several purpose: describing data, view, reports, data transport (XML-RPC)
17
* **OpenERP** is a `Client/Server <http://en.wikipedia.org/wiki/Client_server>`_ system that works over a IP Network.
18
* **OpenERP** programming language is Python.
19
* **OpenERP** uses Object-Oriented technologies.
20
* **OpenERP** records its data with a PostgreSQL relational database.
21
* **OpenERP** business objects are modeled with an Object Relational Mapping (ORM) system.
22
* **OpenERP** offers three Human Machine Interfaces (HMI) a GTK client, a QT client and a web client (eTiny).
23
* **OpenERP** uses ReportLab for report generation in (PDF).
24
* **OpenERP** uses XML for several purpose: describing data, view, reports, data transport (XML-RPC)
26
.. i18n: Technical Architecture
27
.. i18n: ----------------------
29
Technical Architecture
30
----------------------
32
.. i18n: Server/client, XML-RPC
33
.. i18n: ++++++++++++++++++++++
35
Server/client, XML-RPC
36
++++++++++++++++++++++
38
.. i18n: Open ERP is a based on a client/server architecture. The server and the client communicate using the XML-RPC protocol. XML-RPC is a very simple protocol which allows the client to do remote procedure calls. The function called, its arguments, and the result are sent HTTP and encoded using XML.
40
Open ERP is a based on a client/server architecture. The server and the client communicate using the XML-RPC protocol. XML-RPC is a very simple protocol which allows the client to do remote procedure calls. The function called, its arguments, and the result are sent HTTP and encoded using XML.
42
.. i18n: For more information on XML-RPC, please see: http://www.xml-rpc.com/
44
For more information on XML-RPC, please see: http://www.xml-rpc.com/
46
.. i18n: Since version 4.2, there is a new protocol between client/server that have been called net-rpc. It is based on the python cPickle function, it is faster than the xml-rpc.
48
Since version 4.2, there is a new protocol between client/server that have been called net-rpc. It is based on the python cPickle function, it is faster than the xml-rpc.
56
.. i18n: The logic of Open ERP is entirely on the server side. The client is very simple; his work is to ask data (forms, lists, trees) from the server and to send them back. With this approach, nearly all developments are made on the server side. This makes Open ERP easier to develop and to maintain.
58
The logic of Open ERP is entirely on the server side. The client is very simple; his work is to ask data (forms, lists, trees) from the server and to send them back. With this approach, nearly all developments are made on the server side. This makes Open ERP easier to develop and to maintain.
60
.. i18n: The client doesn't understand what it posts. Even actions like 'Click on the print icon' are sent to the server to ask how to react.
62
The client doesn't understand what it posts. Even actions like 'Click on the print icon' are sent to the server to ask how to react.
64
.. i18n: The client operation is very simple; when a user makes an action (save a form, open a menu, print, ...) it sends this action to the server. The server then sends the new action to execute to the client.
66
The client operation is very simple; when a user makes an action (save a form, open a menu, print, ...) it sends this action to the server. The server then sends the new action to execute to the client.
68
.. i18n: There are three types of action;
70
There are three types of action;
72
.. i18n: * Open a window (form or tree)
73
.. i18n: * Print a document
74
.. i18n: * Execute a wizard
76
* Open a window (form or tree)
84
.. i18n: .. figure:: images/client_server.png
86
.. i18n: :align: center
88
.. figure:: images/client_server.png
92
.. i18n: Explanation of modules
93
.. i18n: Server - Base distribution
95
Explanation of modules
96
Server - Base distribution
98
.. i18n: We use a distributed communication mechanism inside the Open ERP server. Our engine support most commonly distributed patterns: request/reply, publish/subscribe, monitoring, triggers/callback, ...
100
We use a distributed communication mechanism inside the Open ERP server. Our engine support most commonly distributed patterns: request/reply, publish/subscribe, monitoring, triggers/callback, ...
102
.. i18n: Different business objects can be in different computers or the same objects can be on multiple computers to perform load-balancing on multiple computers.
103
.. i18n: Server - Object Relational Mapping (ORM)
105
Different business objects can be in different computers or the same objects can be on multiple computers to perform load-balancing on multiple computers.
106
Server - Object Relational Mapping (ORM)
108
.. i18n: This layer provides additional object functionality on top of postgresql:
110
This layer provides additional object functionality on top of postgresql:
112
.. i18n: * Consistency: powerful validity checks,
113
.. i18n: * Work with objects (methods, references, ...)
114
.. i18n: * Row-level security (per user/group/role)
115
.. i18n: * Complex actions on a group of resources
116
.. i18n: * Inheritance
118
* Consistency: powerful validity checks,
119
* Work with objects (methods, references, ...)
120
* Row-level security (per user/group/role)
121
* Complex actions on a group of resources
124
.. i18n: Server - Web-Services
126
Server - Web-Services
128
.. i18n: The web-service module offer a common interface for all web-services
130
The web-service module offer a common interface for all web-services
140
.. i18n: Business objects can also be accessed via the distributed object mechanism. They can all be modified via the client interface with contextual views.
141
.. i18n: Server - Workflow Engine
143
Business objects can also be accessed via the distributed object mechanism. They can all be modified via the client interface with contextual views.
144
Server - Workflow Engine
146
.. i18n: Workflows are graphs represented by business objects that describe the dynamics of the company. Workflows are also used to track processes that evolve over time.
148
Workflows are graphs represented by business objects that describe the dynamics of the company. Workflows are also used to track processes that evolve over time.
150
.. i18n: An example of workflow used in Open ERP:
152
An example of workflow used in Open ERP:
154
.. i18n: A sales order generates an invoice and a shipping order
155
.. i18n: Server - Report Engine
157
A sales order generates an invoice and a shipping order
158
Server - Report Engine
160
.. i18n: Reports in Open ERP can be rendered in different ways:
162
Reports in Open ERP can be rendered in different ways:
164
.. i18n: * Custom reports: those reports can be directly created via the client interface, no programming required. Those reports are represented by business objects (ir.report.custom)
165
.. i18n: * High quality personalized reports using openreport: no programming required but you have to write 2 small XML files:
166
.. i18n: - a template which indicates the data you plan to report
167
.. i18n: - an XSL:RML stylesheet
168
.. i18n: * Hard coded reports
169
.. i18n: * OpenOffice Writer templates
171
* Custom reports: those reports can be directly created via the client interface, no programming required. Those reports are represented by business objects (ir.report.custom)
172
* High quality personalized reports using openreport: no programming required but you have to write 2 small XML files:
173
- a template which indicates the data you plan to report
174
- an XSL:RML stylesheet
176
* OpenOffice Writer templates
178
.. i18n: Nearly all reports are produced in PDF.
179
.. i18n: Server - Business Objects
181
Nearly all reports are produced in PDF.
182
Server - Business Objects
184
.. i18n: Almost everything is a business object in Open ERP, they described all data of the program (workflows, invoices, users, customized reports, ...). Business objects are described using the ORM module. They are persistent and can have multiple views (described by the user or automatically calculated).
186
Almost everything is a business object in Open ERP, they described all data of the program (workflows, invoices, users, customized reports, ...). Business objects are described using the ORM module. They are persistent and can have multiple views (described by the user or automatically calculated).
188
.. i18n: Business objects are structured in the /module directory.
189
.. i18n: Client - Wizards
191
Business objects are structured in the /module directory.
194
.. i18n: Wizards are graphs of actions/windows that the user can perform during a session.
195
.. i18n: Client - Widgets
197
Wizards are graphs of actions/windows that the user can perform during a session.
200
.. i18n: Widgets are probably, although the origin of the term seems to be very difficult to trace, "WIndow gaDGETS" in the IT world, which mean they are gadgets before anything, which implement elementary features through a portable visual tool.
202
Widgets are probably, although the origin of the term seems to be very difficult to trace, "WIndow gaDGETS" in the IT world, which mean they are gadgets before anything, which implement elementary features through a portable visual tool.
204
.. i18n: All common widgets are supported:
206
All common widgets are supported:
210
.. i18n: * floating point numbers
211
.. i18n: * dates (with calendar)
212
.. i18n: * checkboxes
217
* floating point numbers
218
* dates (with calendar)
222
.. i18n: And also all special widgets:
224
And also all special widgets:
226
.. i18n: * buttons that call actions
227
.. i18n: * references widgets
234
.. i18n: - one2many in list
238
* buttons that call actions
250
.. i18n: Widget have different appearances in different views. For example, the date widget in the search dialog represents two normal dates for a range of date (from...to...).
252
Widget have different appearances in different views. For example, the date widget in the search dialog represents two normal dates for a range of date (from...to...).
254
.. i18n: Some widgets may have different representations depending on the context. For example, the one2many widget can be represented as a form with multiple pages or a multi-columns list.
256
Some widgets may have different representations depending on the context. For example, the one2many widget can be represented as a form with multiple pages or a multi-columns list.
258
.. i18n: Events on the widgets module are processed with a callback mechanism. A callback mechanism is a process whereby an element defines the type of events he can handle and which methods should be called when this event is triggered. Once the event is triggered, the system knows that the event is bound to a specific method, and calls that method back. Hence callback.
260
Events on the widgets module are processed with a callback mechanism. A callback mechanism is a process whereby an element defines the type of events he can handle and which methods should be called when this event is triggered. Once the event is triggered, the system knows that the event is bound to a specific method, and calls that method back. Hence callback.