From ff51574faedd500d00983903a1c9153571679471 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 16 Jan 2014 15:49:57 +0100 Subject: [PATCH] [FIX] somebody renamed classes without fixing the corresponding autodoc invocation bzr revid: xmo@openerp.com-20140116144957-j2no6ls83vfxtgbk --- doc/conf.py | 1 - doc/ir_actions.rst | 14 ++++---------- openerp/addons/base/ir/ir_actions.py | 6 +++--- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 57edef310c9..19f2c9b727f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -252,5 +252,4 @@ texinfo_documents = [ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('http://docs.python.org/', None), - 'openerpweb': ('http://doc.openerp.com/trunk/developers/web', None), } diff --git a/doc/ir_actions.rst b/doc/ir_actions.rst index 31d22a7ead9..e54df3ce377 100644 --- a/doc/ir_actions.rst +++ b/doc/ir_actions.rst @@ -12,26 +12,20 @@ Server actions .. currentmodule:: openerp.addons.base.ir.ir_actions -.. autoclass:: actions_server - :noindex: +.. autoclass:: ir_actions_server + :members: run, _get_states Adding a new sever action ------------------------- The ``state`` field holds the various available types of server action. In order -to add a new server action, the first thing to do is to override the ``_get_states`` +to add a new server action, the first thing to do is to override the :meth:`~.ir_actions_server._get_states` method that returns the list of values available for the selection field. -.. automethod:: actions_server._get_states - :noindex: - -The method called when executing the server action is the ``run`` method. This +The method called when executing the server action is the :meth:`~.ir_actions_server.run` method. This method calls ``run_action_``. When adding a new server action type, you have to define the related method that will be called upon execution. -.. automethod:: actions_server.run - :noindex: - Changelog --------- diff --git a/openerp/addons/base/ir/ir_actions.py b/openerp/addons/base/ir/ir_actions.py index fe3e715aba2..a6bb38b5df7 100644 --- a/openerp/addons/base/ir/ir_actions.py +++ b/openerp/addons/base/ir/ir_actions.py @@ -911,10 +911,10 @@ class ir_actions_server(osv.osv): self.pool[action.model_id.model].write(cr, uid, [context.get('active_id')], {action.link_field_id.name: res_id}) def run(self, cr, uid, ids, context=None): - """ Run the server action. For each server action, the condition is - checked. Note that A void (aka False) condition is considered as always + """ Runs the server action. For each server action, the condition is + checked. Note that a void (``False``) condition is considered as always valid. If it is verified, the run_action_ method is called. This - allows easy inheritance of the server actions. + allows easy overriding of the server actions. :param dict context: context should contain following keys