[IMP] point_of_sale: forgot a few changes related to previous commit
[odoo/odoo.git] / doc / ir_actions.rst
1 .. _ir-actions:
2
3 Ir Actions
4 ===========
5
6 .. _ir-actions-server:
7
8 Server actions
9 ++++++++++++++
10
11 .. versionchanged:: 8.0
12
13 .. currentmodule:: openerp.addons.base.ir.ir_actions
14
15 .. autoclass:: actions_server
16   :noindex:
17
18 Adding a new sever action
19 -------------------------
20
21 The ``state`` field holds the various available types of server action. In order
22 to add a new server action, the first thing to do is to override the ``_get_states``
23 method that returns the list of values available for the selection field.
24
25 .. automethod:: actions_server._get_states
26   :noindex:
27
28 The method called when executing the server action is the ``run`` method. This
29 method calls ``run_action_<STATE>``. When adding a new server action type, you
30 have to define the related method that will be called upon execution.
31
32 .. automethod:: actions_server.run
33   :noindex:
34
35 Changelog
36 ---------
37
38 `8.0`
39 '''''
40
41 The refactoring of OpenERP 8.0 server actions removed the following types of
42 server action:
43
44  - ``loop``: can be replaced by a ``code`` action
45  - ``dummy``: can be replaced by a void ``code`` action
46  - ``object_create`` and ``object_copy`` have been merged into a single and
47    more understandable ``object_create`` action
48  - ``other`` is renamed ``multi`` and raises in case of loops