11 .. versionchanged:: 8.0
13 .. currentmodule:: openerp.addons.base.ir.ir_actions
15 .. autoclass:: ir_actions_server
16 :members: run, _get_states
18 Adding a new sever action
19 -------------------------
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 :meth:`~.ir_actions_server._get_states`
23 method that returns the list of values available for the selection field.
25 The method called when executing the server action is the :meth:`~.ir_actions_server.run` method. This
26 method calls ``run_action_<STATE>``. When adding a new server action type, you
27 have to define the related method that will be called upon execution.
35 The refactoring of OpenERP 8.0 server actions removed the following types of
38 - ``loop``: can be replaced by a ``code`` action
39 - ``dummy``: can be replaced by a void ``code`` action
40 - ``object_create`` and ``object_copy`` have been merged into a single and
41 more understandable ``object_create`` action
42 - ``other`` is renamed ``multi`` and raises in case of loops