From 059cc5bef3a4eb60768be9f9a750a468b87d57a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 13 Mar 2012 13:29:39 +0100 Subject: [PATCH] [ADD] Added documentation for merge proposal, related to the need_action mixin class. bzr revid: tde@openerp.com-20120313122939-239ae3ftask1rrmb --- doc/api/need_action_specs.rst | 8 ++++++++ doc/index.rst.inc | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 doc/api/need_action_specs.rst diff --git a/doc/api/need_action_specs.rst b/doc/api/need_action_specs.rst new file mode 100644 index 00000000000..5d5d94cf903 --- /dev/null +++ b/doc/api/need_action_specs.rst @@ -0,0 +1,8 @@ +Need action mixin class +======================= + +This revision adds a mixin class for object implementing the need action mechanism. Need action mechanism can be used by objects that have to be able to signal that an action is required on a particular record. If in the business logic an action must be performed by somebody, for instance validation by a manager, this mechanism allows to set a field with the user_id of the user requested to perform the action. + +Technically, this class adds a need_action_user_id field; when set to false, no action is required; when an user_id is set, this user has an action to perform. This field is a function field. Setting an user_id is done through redefining the get_needaction_user_id method. Therefore by redefining only one method, you can specify the cases in which an action will be required on a particular record. + +This mechanism is used for instance to display the number of pending actions in menus, such as Leads (12). diff --git a/doc/index.rst.inc b/doc/index.rst.inc index 05c4a53640b..f6c4f6dbf20 100644 --- a/doc/index.rst.inc +++ b/doc/index.rst.inc @@ -6,3 +6,11 @@ OpenERP Server :maxdepth: 1 test-framework + +New feature merges +++++++++++++++++++ + +.. toctree:: + :maxdepth: 1 + + api/need_action_specs