11
.. i18n: Server action is an new feature to the OpenERP available since the version 5.0 beta, This is the
12
.. i18n: interesting features for the customizer, to full fill the customers requirements, This features enables
13
.. i18n: to provides the quick and easy configuration some process which is day to day requirements. Like
14
.. i18n: send email on confirmation of the sale order, or confirmation of the Invoice, log the operation of
15
.. i18n: the invoice (confirm, cancel, etc..). or need to develope some system which runs wizard / report on
16
.. i18n: the confirmation of the sales, purchase, or invoice. So Server action is the only one answer to solve
17
.. i18n: all this kind of problems without doing any development, just a few configuration and the system is
18
.. i18n: ready to answer few of above questions.
23
Server action is an new feature to the OpenERP available since the version 5.0 beta, This is the
24
interesting features for the customizer, to full fill the customers requirements, This features enables
25
to provides the quick and easy configuration some process which is day to day requirements. Like
26
send email on confirmation of the sale order, or confirmation of the Invoice, log the operation of
27
the invoice (confirm, cancel, etc..). or need to develope some system which runs wizard / report on
28
the confirmation of the sales, purchase, or invoice. So Server action is the only one answer to solve
29
all this kind of problems without doing any development, just a few configuration and the system is
30
ready to answer few of above questions.
32
.. i18n: Following are the list of action types which are supplied under the Server Action.
35
Following are the list of action types which are supplied under the Server Action.
37
.. i18n: * Client Action
41
.. i18n: * Create Object
42
.. i18n: * Write Object
43
.. i18n: * Multi Action
54
.. i18n: Each type of action have the special features and different configuration parameters. We will see
55
.. i18n: one by one all type of action how to configure and list of parameters that affect the system
58
Each type of action have the special features and different configuration parameters. We will see
59
one by one all type of action how to configure and list of parameters that affect the system
61
.. i18n: Client Action
62
.. i18n: -------------
68
.. i18n: This action executes at client side, this is a good idea to run the wizard or report at client side.
69
.. i18n: Using this type of action we can make the system like ERP will print the invoice after confirmation
70
.. i18n: of the Invoice. Like it will run the payment wizard after confirmation of the invoice. Technically we
71
.. i18n: can run all client action which execute at client side. We can execute ir.actions.report.custom,
72
.. i18n: ir.actions.report.xml, ir.actions.act_window, ir.actions.wizard, or ir.actions.url. Here is an example
73
.. i18n: to show how we can configuration Client action to print the invoice after confirmation of the
77
This action executes at client side, this is a good idea to run the wizard or report at client side.
78
Using this type of action we can make the system like ERP will print the invoice after confirmation
79
of the Invoice. Like it will run the payment wizard after confirmation of the invoice. Technically we
80
can run all client action which execute at client side. We can execute ir.actions.report.custom,
81
ir.actions.report.xml, ir.actions.act_window, ir.actions.wizard, or ir.actions.url. Here is an example
82
to show how we can configuration Client action to print the invoice after confirmation of the
85
.. i18n: .. image:: images/client_action.png
88
.. image:: images/client_action.png
90
.. i18n: This is an good and seems easy to configure the action.
93
This is an good and seems easy to configure the action.
95
.. i18n: Important fields are
100
.. i18n: :Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
101
.. i18n: :Client Action: Select the client action that is to execute at client side. Any of the following types.
104
:Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
105
:Client Action: Select the client action that is to execute at client side. Any of the following types.
107
.. i18n: * ir.actions.report.custom
108
.. i18n: * ir.actions.report.xml
109
.. i18n: * ir.actions.act_window
110
.. i18n: * ir.actions.wizard
111
.. i18n: * ir.actions.url
114
* ir.actions.report.custom
115
* ir.actions.report.xml
116
* ir.actions.act_window
127
.. i18n: Trigger is an really excellent when we want to deal with the work flow of the other object which
128
.. i18n: working the work flow of the first object. For example we want to configure the system like when
129
.. i18n: we confirm the purchase order and create the invoice that newly created invoice should confirm it
130
.. i18n: self automatically by the server action.
133
Trigger is an really excellent when we want to deal with the work flow of the other object which
134
working the work flow of the first object. For example we want to configure the system like when
135
we confirm the purchase order and create the invoice that newly created invoice should confirm it
136
self automatically by the server action.
138
.. i18n: .. image:: images/trigger_action.png
141
.. image:: images/trigger_action.png
143
.. i18n: This is the easy configuration for the trigger to have the system where the created invoice will
144
.. i18n: confirm it self.
147
This is the easy configuration for the trigger to have the system where the created invoice will
150
.. i18n: Important fields are
155
.. i18n: :Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
158
:Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
160
.. i18n: :Work-flow on: Here we select invoice, need to select the model on which the automatic workflow will be called by the action system
163
:Work-flow on: Here we select invoice, need to select the model on which the automatic workflow will be called by the action system
165
.. i18n: :Trigger On: We need to provide the id of the newly record, here in this case, Purchase order store the id of the Invoice after creating of the invoice in invoice_id field.
168
:Trigger On: We need to provide the id of the newly record, here in this case, Purchase order store the id of the Invoice after creating of the invoice in invoice_id field.
170
.. i18n: :Trigger Name: This is the signal name which we want to generate on the newly created object.
173
:Trigger Name: This is the signal name which we want to generate on the newly created object.
175
.. i18n: Email Action
176
.. i18n: ------------
182
.. i18n: This is the common requirement for all business process, like send the confirmation by the email
183
.. i18n: when sales order, purchase order, invoice, payment, shipping of goods will takes place. For that we
184
.. i18n: need only few things to configure and tiny will send the email very quickly and in easy way. Even
185
.. i18n: not need to setting up the your own email server, you can use your exciting email server and
186
.. i18n: account, of you not have your email server you can use from the free email account by Gmail,
187
.. i18n: Yahoo !, etc..
190
This is the common requirement for all business process, like send the confirmation by the email
191
when sales order, purchase order, invoice, payment, shipping of goods will takes place. For that we
192
need only few things to configure and tiny will send the email very quickly and in easy way. Even
193
not need to setting up the your own email server, you can use your exciting email server and
194
account, of you not have your email server you can use from the free email account by Gmail,
197
.. i18n: *Server Configuration*
200
*Server Configuration*
202
.. i18n: supply the following parameters when we run OpenERP Server.
205
supply the following parameters when we run OpenERP Server.
209
.. i18n: --email-from=gajjarmantavya@yahoo.co.in user email address
210
.. i18n: --smtp=smtp.mail.yahoo.co.in smtp server name or ip
211
.. i18n: --smtp-port=587 smtp port
212
.. i18n: --smtp-user=gajjarmantavya user name usually same as the email address name without domain name
213
.. i18n: --smtp-password=************* password to the user account
214
.. i18n: --smtp-ssl=False use in case if the server required ssl for sending email
219
--email-from=gajjarmantavya@yahoo.co.in user email address
220
--smtp=smtp.mail.yahoo.co.in smtp server name or ip
221
--smtp-port=587 smtp port
222
--smtp-user=gajjarmantavya user name usually same as the email address name without domain name
223
--smtp-password=************* password to the user account
224
--smtp-ssl=False use in case if the server required ssl for sending email
231
.. i18n: Email Action Configuration
234
Email Action Configuration
236
.. i18n: .. image:: images/email_action.png
239
.. image:: images/email_action.png
241
.. i18n: Important Fields are:
244
Important Fields are:
246
.. i18n: :Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
247
.. i18n: :Contact: We need to select the fields from which action will select the email address to whom we would like to send the email, system will display all the fields related to the current object selected in the Object field
248
.. i18n: :Message: You can provide the message template with the fields that relate to the current object. And it will be merged when it is going to send the email. This is the same language than the rml which is used to design the report here we can use the [[ ]] + html tags to design in the html format Working with You can select the any fields from the current object, like here we select the [[ ]] invoice in the object.
251
:Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
252
:Contact: We need to select the fields from which action will select the email address to whom we would like to send the email, system will display all the fields related to the current object selected in the Object field
253
:Message: You can provide the message template with the fields that relate to the current object. And it will be merged when it is going to send the email. This is the same language than the rml which is used to design the report here we can use the [[ ]] + html tags to design in the html format Working with You can select the any fields from the current object, like here we select the [[ ]] invoice in the object.
255
.. i18n: For example to get the partner name we can use [[ object.partner_id.name ]]like the same, object refers to the current object and we can access any fields which exist in the model.
258
For example to get the partner name we can use [[ object.partner_id.name ]]like the same, object refers to the current object and we can access any fields which exist in the model.
260
.. i18n: After confirmation the invoice we get the confirmation email from the action.
263
After confirmation the invoice we get the confirmation email from the action.
265
.. i18n: .. image:: images/email_confirm.png
268
.. image:: images/email_confirm.png
270
.. i18n: Create Object
271
.. i18n: -------------
277
.. i18n: This is an interesting feature for the tiny partners those who want to track the transaction in the
278
.. i18n: OpenERP, like currently in the ERP you can get the Event history on the Partners which logs the
279
.. i18n: only the sales order events. But if we want to start logging the invoice like the same we can easily
280
.. i18n: do like that using the Create object Actions.
283
This is an interesting feature for the tiny partners those who want to track the transaction in the
284
OpenERP, like currently in the ERP you can get the Event history on the Partners which logs the
285
only the sales order events. But if we want to start logging the invoice like the same we can easily
286
do like that using the Create object Actions.
288
.. i18n: .. image:: images/create_object.png
291
.. image:: images/create_object.png
293
.. i18n: Create Object action have the easy but tricky configuration, for the movement you have to
294
.. i18n: remember the fields name or check it out from the code it self, in future we will develop the
295
.. i18n: expression builder inside OpenERP so you can build the complex expression.
298
Create Object action have the easy but tricky configuration, for the movement you have to
299
remember the fields name or check it out from the code it self, in future we will develop the
300
expression builder inside OpenERP so you can build the complex expression.
302
.. i18n: Important fields are
307
.. i18n: :Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
308
.. i18n: :Model: This is the target model where the new object is to be created, if its empty it refers to the current object and allow to select the fields from the same, but its advisable to provide the model in all case if different or if the same.
309
.. i18n: :Fields Mapping: Need to provide the 3 values
312
:Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
313
:Model: This is the target model where the new object is to be created, if its empty it refers to the current object and allow to select the fields from the same, but its advisable to provide the model in all case if different or if the same.
314
:Fields Mapping: Need to provide the 3 values
316
.. i18n: 1. Field: any of the fields from the target model
317
.. i18n: 2. type of the value you can give either value or expression
318
.. i18n: 3. provide the value or expression the expression again start with the 'object' keyword and its refers to the current object which selected in to the Object field.
321
1. Field: any of the fields from the target model
322
2. type of the value you can give either value or expression
323
3. provide the value or expression the expression again start with the 'object' keyword and its refers to the current object which selected in to the Object field.
325
.. i18n: *You must select the all required fields from the object*
328
*You must select the all required fields from the object*
330
.. i18n: :Record Id: After creating the new record where the id of the new record if going to store. So in future we can refer the same for the other operations.
333
:Record Id: After creating the new record where the id of the new record if going to store. So in future we can refer the same for the other operations.
335
.. i18n: Write Object
336
.. i18n: ------------
342
.. i18n: The same configuration as defined for the Create Object, here we take an example that it will write the
343
.. i18n: 'Additional Information' on the same object
346
The same configuration as defined for the Create Object, here we take an example that it will write the
347
'Additional Information' on the same object
349
.. i18n: .. image:: images/write_object.png
352
.. image:: images/write_object.png
354
.. i18n: Important Fields are
359
.. i18n: **same as the Create Object**
362
**same as the Create Object**
364
.. i18n: Multi Action
365
.. i18n: ------------
371
.. i18n: This is the most interesting action, which allows to execute the multiple server action on the same
372
.. i18n: business operations. Like if you want to print and send the email on confirmation of the invoice. We
373
.. i18n: need to create the 3 Server Actions for that.
376
This is the most interesting action, which allows to execute the multiple server action on the same
377
business operations. Like if you want to print and send the email on confirmation of the invoice. We
378
need to create the 3 Server Actions for that.
380
.. i18n: * Print Invoice
381
.. i18n: * Invoice Confirmation Email !!
382
.. i18n: * Multi Action
386
* Invoice Confirmation Email !!
389
.. i18n: The only problem with the Multi Action is that it will execute many actions at the server side, but only
390
.. i18n: one client action will be executed.
393
The only problem with the Multi Action is that it will execute many actions at the server side, but only
394
one client action will be executed.
396
.. i18n: For example we would like to print report + execute the wizard this 2 operation is not allowd in the
397
.. i18n: one multi action.
400
For example we would like to print report + execute the wizard this 2 operation is not allowd in the
403
.. i18n: .. image:: images/multi_action.png
406
.. image:: images/multi_action.png
408
.. i18n: Important Fields are
413
.. i18n: :Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
414
.. i18n: :Other Actions: We need to select the server action in this fields, we are free to select the as many as actions as we can. Just we need to take care for the problem of the multi action, other things is very easy.
417
:Object: Select the object on which we want to implement the Server Action when work flow will execute on this object
418
:Other Actions: We need to select the server action in this fields, we are free to select the as many as actions as we can. Just we need to take care for the problem of the multi action, other things is very easy.
420
.. i18n: **Link it up with the Work flow**
423
**Link it up with the Work flow**
425
.. i18n: The important things is to link the server action with the work flow, its bit easy to link with action
426
.. i18n: with the work flow. Open the work flow editor in GTK, select the work flow and go to the start and
427
.. i18n: select the Sever Action. This will automatically be called when the object comes to that state.
430
The important things is to link the server action with the work flow, its bit easy to link with action
431
with the work flow. Open the work flow editor in GTK, select the work flow and go to the start and
432
select the Sever Action. This will automatically be called when the object comes to that state.
434
.. i18n: .. image:: images/link_workflow.png
437
.. image:: images/link_workflow.png
439
.. i18n: Here in this example I added the Action to print the Invoice, when the Invoice will be confirmed.
442
Here in this example I added the Action to print the Invoice, when the Invoice will be confirmed.