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