3
.. i18n: single: process
4
.. i18n: single: workflow
10
.. i18n: Workflows and User Processes
11
.. i18n: =============================
13
Workflows and User Processes
14
=============================
16
.. i18n: Workflows are used to define the behaviour of a given document. They are used
17
.. i18n: by developers and system implementers to determine which object should execute
18
.. i18n: which actions and at which moments. These are principally technical processes
19
.. i18n: defined in a vertical way on the lifecycle of a complete object (represented by
20
.. i18n: a document). Changing a workflow will have a direct impact on the behaviour of
21
.. i18n: the software in response to user actions. You handle all possible exceptions
22
.. i18n: there so that the software is robust.
24
Workflows are used to define the behaviour of a given document. They are used
25
by developers and system implementers to determine which object should execute
26
which actions and at which moments. These are principally technical processes
27
defined in a vertical way on the lifecycle of a complete object (represented by
28
a document). Changing a workflow will have a direct impact on the behaviour of
29
the software in response to user actions. You handle all possible exceptions
30
there so that the software is robust.
32
.. i18n: .. figure:: images/process_sale_workflow.png
34
.. i18n: :align: center
36
.. i18n: *Example of a workflow handling a customer order*
38
.. figure:: images/process_sale_workflow.png
42
*Example of a workflow handling a customer order*
44
.. i18n: Unlike workflows, user processes represent workflows across all of a company
45
.. i18n: and its documents. They are used by end users to locate an action for more
46
.. i18n: complete handling. A change of user process won't have any effect on the
47
.. i18n: software but will show the user another way of working on a given problem.
49
Unlike workflows, user processes represent workflows across all of a company
50
and its documents. They are used by end users to locate an action for more
51
complete handling. A change of user process won't have any effect on the
52
software but will show the user another way of working on a given problem.
54
.. i18n: .. figure:: images/process_sale_process.png
56
.. i18n: :align: center
58
.. i18n: *Example of a process handling a customer order*
60
.. figure:: images/process_sale_process.png
64
*Example of a process handling a customer order*
66
.. i18n: Processes are used by end users to help them understand the problems which
67
.. i18n: haven't been handled in Open ERP. You can find actions that have no influence
68
.. i18n: on the software, such as “Telephone customer to thank him”, and “Send a fax to
69
.. i18n: reassure him”. As well as providing user help, processes provide functions such
72
Processes are used by end users to help them understand the problems which
73
haven't been handled in Open ERP. You can find actions that have no influence
74
on the software, such as “Telephone customer to thank him”, and “Send a fax to
75
reassure him”. As well as providing user help, processes provide functions such
78
.. i18n: * integration with Open ERP help and the company's quality manual,
80
.. i18n: * showing the user menu for finding a specific document.
82
* integration with Open ERP help and the company's quality manual,
84
* showing the user menu for finding a specific document.
86
.. i18n: .. figure:: images/process_cross_worfklow_process.png
88
.. i18n: :align: center
90
.. i18n: *Relationship between workflow and user process*
92
.. figure:: images/process_cross_worfklow_process.png
96
*Relationship between workflow and user process*
98
.. i18n: User processes are thus connected to technical workflows. If you modify the
99
.. i18n: software's behaviour with a workflow, the changes will be directly visible in
100
.. i18n: the user processes that are based on the modified document. So if you add new
101
.. i18n: required roles for certain transitions on a workflow they will automatically be
102
.. i18n: shown in the process corresponding to the modified document.
104
User processes are thus connected to technical workflows. If you modify the
105
software's behaviour with a workflow, the changes will be directly visible in
106
the user processes that are based on the modified document. So if you add new
107
required roles for certain transitions on a workflow they will automatically be
108
shown in the process corresponding to the modified document.
110
.. i18n: To get maximum benefit from the power of user processes and the workflow
111
.. i18n: engine, Open ERP provides an integrated workflow editor and user process
112
.. i18n: editor. This enable you to modify them through the client interface.
114
To get maximum benefit from the power of user processes and the workflow
115
engine, Open ERP provides an integrated workflow editor and user process
116
editor. This enable you to modify them through the client interface.
118
.. i18n: You'll only work with the process editor in this chapter. If you want to test the
119
.. i18n: workflow editor click on the link to the bottom left of a document and select
120
.. i18n: the menu :menuselection:`Customize --> Manage Workflows`. Open ERP opens a graphical editor to
121
.. i18n: modify the workflow for the selected document type.
123
You'll only work with the process editor in this chapter. If you want to test the
124
workflow editor click on the link to the bottom left of a document and select
125
the menu :menuselection:`Customize --> Manage Workflows`. Open ERP opens a graphical editor to
126
modify the workflow for the selected document type.
128
.. i18n: .. figure:: images/process_workflow_editor.png
130
.. i18n: :align: center
132
.. i18n: *Workflow editor modifying the behaviour of invoices*
134
.. figure:: images/process_workflow_editor.png
138
*Workflow editor modifying the behaviour of invoices*
140
.. i18n: The workflow editor is only available in Open ERP's web client at the time of writing.
141
.. i18n: If you have the GTK client you can use the menus in
142
.. i18n: :menuselection:`Administration --> Low Level Objects --> Workflow Items`.
143
.. i18n: These are text-based not graphical.
145
The workflow editor is only available in Open ERP's web client at the time of writing.
146
If you have the GTK client you can use the menus in
147
:menuselection:`Administration --> Low Level Objects --> Workflow Items`.
148
These are text-based not graphical.
150
.. i18n: Using processes effectively
151
.. i18n: ----------------------------
153
Using processes effectively
154
----------------------------
156
.. i18n: Regardless of which Open ERP screen you're in you can call up a process on the
157
.. i18n: current document by clicking the :guilabel:`Process` icon. Depending on the document you
158
.. i18n: can have several processes defined using it, Open ERP then asks you to choose
159
.. i18n: which one of them you want.
161
Regardless of which Open ERP screen you're in you can call up a process on the
162
current document by clicking the :guilabel:`Process` icon. Depending on the document you
163
can have several processes defined using it, Open ERP then asks you to choose
164
which one of them you want.
166
.. i18n: For example if you are in a meeting form, Open ERP will ask you to choose from
167
.. i18n: the processes it knows about that involve such forms:
169
For example if you are in a meeting form, Open ERP will ask you to choose from
170
the processes it knows about that involve such forms:
172
.. i18n: * processes for selecting and inducting new employees,
174
.. i18n: * tracing customer orders in pre-sales,
176
.. i18n: * processes for visiting customers and handling expenses.
178
* processes for selecting and inducting new employees,
180
* tracing customer orders in pre-sales,
182
* processes for visiting customers and handling expenses.
184
.. i18n: .. figure:: images/process_screen.png
186
.. i18n: :align: center
188
.. i18n: *Button for entering a user process from a form*
190
.. figure:: images/process_screen.png
194
*Button for entering a user process from a form*
196
.. i18n: The element colored red shows the active process for the selected document.
197
.. i18n: Elements in grey are the states that the selected document won't go through
198
.. i18n: because of its configuration. You can use the different icons to open the
199
.. i18n: document, print it, or get its documentation.
201
The element colored red shows the active process for the selected document.
202
Elements in grey are the states that the selected document won't go through
203
because of its configuration. You can use the different icons to open the
204
document, print it, or get its documentation.
206
.. i18n: Some states have an image inside of arrows formed into a circle. These show
207
.. i18n: that the state refers to another process. To go to this other process you can
208
.. i18n: click on the title of the state. For example you can click on the invoice in
209
.. i18n: the customer order management workflow to see in detail how that invoice is
212
Some states have an image inside of arrows formed into a circle. These show
213
that the state refers to another process. To go to this other process you can
214
click on the title of the state. For example you can click on the invoice in
215
the customer order management workflow to see in detail how that invoice is
218
.. i18n: .. figure:: images/process_subflow_icon.png
220
.. i18n: :align: center
222
.. i18n: *A state that refers to another workflow*
224
.. figure:: images/process_subflow_icon.png
228
*A state that refers to another workflow*
230
.. i18n: Finally, you can place your mouse for a second over a transition (hover over a
231
.. i18n: transition) to get a help balloon appearing about this transition. Open ERP
232
.. i18n: then shows you:
234
Finally, you can place your mouse for a second over a transition (hover over a
235
transition) to get a help balloon appearing about this transition. Open ERP
238
.. i18n: * A description of the transition,
240
.. i18n: * The actions you can take at this step,
242
.. i18n: * The roles you need to make anything happen from this step.
244
* A description of the transition,
246
* The actions you can take at this step,
248
* The roles you need to make anything happen from this step.
250
.. i18n: .. figure:: images/process_transition.png
252
.. i18n: :align: center
254
.. i18n: *Detail of a transition in a workflow*
256
.. figure:: images/process_transition.png
260
*Detail of a transition in a workflow*
262
.. i18n: If you click on the transition, Open ERP opens a dialog box with buttons that
263
.. i18n: enable you to change the document state. These are the same buttons that you
264
.. i18n: see on the active document form. They enable you to confirm an order directly
265
.. i18n: from the process and then see the consequences in real time at a macro level.
267
If you click on the transition, Open ERP opens a dialog box with buttons that
268
enable you to change the document state. These are the same buttons that you
269
see on the active document form. They enable you to confirm an order directly
270
from the process and then see the consequences in real time at a macro level.
273
.. i18n: single: process; defining
276
single: process; defining
278
.. i18n: Defining your own user processes
279
.. i18n: ---------------------------------
281
Defining your own user processes
282
---------------------------------
284
.. i18n: Use the menus under :menuselection:`Administration --> Customization --> Enterprise Processes` to
285
.. i18n: define new processes or modify existing processes. When entering a process,
286
.. i18n: Open ERP shows you the list of states available for that process.
288
Use the menus under :menuselection:`Administration --> Customization --> Enterprise Processes` to
289
define new processes or modify existing processes. When entering a process,
290
Open ERP shows you the list of states available for that process.
292
.. i18n: .. figure:: images/process_form.png
294
.. i18n: :align: center
296
.. i18n: *Form for defining a process*
298
.. figure:: images/process_form.png
302
*Form for defining a process*
304
.. i18n: You can add a new state or modify an existing state. A state can be associated
305
.. i18n: with an object (whose instances are represented by documents). If that is the
306
.. i18n: case, choose it in the case object. You can set an expression that shows if the
307
.. i18n: object can be found in that state or not. Expressions are in Python format. For
308
.. i18n: example for the quotation state choose the object ``sale.order`` and set the
309
.. i18n: following expression ``object.state == 'draft'`` .
311
You can add a new state or modify an existing state. A state can be associated
312
with an object (whose instances are represented by documents). If that is the
313
case, choose it in the case object. You can set an expression that shows if the
314
object can be found in that state or not. Expressions are in Python format. For
315
example for the quotation state choose the object ``sale.order`` and set the
316
following expression ``object.state == 'draft'`` .
318
.. i18n: You can also link to a menu so that users can learn which menu to use to access
319
.. i18n: objects in a state. You can set the conditions in which this object is in a
320
.. i18n: greyed-out state in the second tab :guilabel:`Conditions`. These expressions, too, are
321
.. i18n: encoded in Python format.
323
You can also link to a menu so that users can learn which menu to use to access
324
objects in a state. You can set the conditions in which this object is in a
325
greyed-out state in the second tab :guilabel:`Conditions`. These expressions, too, are
326
encoded in Python format.
328
.. i18n: Once the node has been defined you should set the transitions leaving this
329
.. i18n: object. For each transition you can:
331
Once the node has been defined you should set the transitions leaving this
332
object. For each transition you can:
334
.. i18n: * Give the leaving and destination states,
336
.. i18n: * Set up a list of buttons that start various transitions in the process,
338
.. i18n: * Map between workflow transitions and the document that's selected,
340
.. i18n: * Put an explanatory notice in different languages.
342
* Give the leaving and destination states,
344
* Set up a list of buttons that start various transitions in the process,
346
* Map between workflow transitions and the document that's selected,
348
* Put an explanatory notice in different languages.
350
.. i18n: .. figure:: images/process_transition_form.png
352
.. i18n: :align: center
354
.. i18n: *Screen for defining a process transition*
356
.. figure:: images/process_transition_form.png
360
*Screen for defining a process transition*
362
.. i18n: .. Copyright © Open Object Press. All rights reserved.
364
.. Copyright © Open Object Press. All rights reserved.
366
.. i18n: .. You may take electronic copy of this publication and distribute it if you don't
367
.. i18n: .. change the content. You can also print a copy to be read by yourself only.
369
.. You may take electronic copy of this publication and distribute it if you don't
370
.. change the content. You can also print a copy to be read by yourself only.
372
.. i18n: .. We have contracts with different publishers in different countries to sell and
373
.. i18n: .. distribute paper or electronic based versions of this book (translated or not)
374
.. i18n: .. in bookstores. This helps to distribute and promote the Open ERP product. It
375
.. i18n: .. also helps us to create incentives to pay contributors and authors using author
376
.. i18n: .. rights of these sales.
378
.. We have contracts with different publishers in different countries to sell and
379
.. distribute paper or electronic based versions of this book (translated or not)
380
.. in bookstores. This helps to distribute and promote the Open ERP product. It
381
.. also helps us to create incentives to pay contributors and authors using author
382
.. rights of these sales.
384
.. i18n: .. Due to this, grants to translate, modify or sell this book are strictly
385
.. i18n: .. forbidden, unless Tiny SPRL (representing Open Object Press) gives you a
386
.. i18n: .. written authorisation for this.
388
.. Due to this, grants to translate, modify or sell this book are strictly
389
.. forbidden, unless Tiny SPRL (representing Open Object Press) gives you a
390
.. written authorisation for this.
392
.. i18n: .. Many of the designations used by manufacturers and suppliers to distinguish their
393
.. i18n: .. products are claimed as trademarks. Where those designations appear in this book,
394
.. i18n: .. and Open Object Press was aware of a trademark claim, the designations have been
395
.. i18n: .. printed in initial capitals.
397
.. Many of the designations used by manufacturers and suppliers to distinguish their
398
.. products are claimed as trademarks. Where those designations appear in this book,
399
.. and Open Object Press was aware of a trademark claim, the designations have been
400
.. printed in initial capitals.
402
.. i18n: .. While every precaution has been taken in the preparation of this book, the publisher
403
.. i18n: .. and the authors assume no responsibility for errors or omissions, or for damages
404
.. i18n: .. resulting from the use of the information contained herein.
406
.. While every precaution has been taken in the preparation of this book, the publisher
407
.. and the authors assume no responsibility for errors or omissions, or for damages
408
.. resulting from the use of the information contained herein.
410
.. i18n: .. Published by Open Object Press, Grand Rosière, Belgium
412
.. Published by Open Object Press, Grand Rosière, Belgium