From e6833f4b3c4cc3948e7ef19bddb473e7ba9d2fae Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 25 Jun 2013 16:51:00 +0200 Subject: [PATCH] [IMP] small twaeks in doc bzr revid: mat@openerp.com-20130625145100-7ko58fj4z0p3ouqc --- addons/gamification/doc/goal_type.rst | 5 +++++ addons/gamification/doc/index.rst | 2 ++ addons/gamification/goal_type_data.py | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/gamification/doc/goal_type.rst b/addons/gamification/doc/goal_type.rst index 519e679db8d..4da960b3371 100644 --- a/addons/gamification/doc/goal_type.rst +++ b/addons/gamification/doc/goal_type.rst @@ -35,3 +35,8 @@ Fields - ``sequence`` : to order list of goals in a challenger - ``action_id`` : the XML id to of an ir.actions.act_window to execute when the user clicks on a goal on the home page - ``res_id_field`` : the res_id used by the action, using user as for the domain (eg: user.company_id.id) + +Methods ++++++++ + +Add new methods inheriting from this class to add goal type with python computation mode. Look at the example in ``gamification/goal_type_data.py`` \ No newline at end of file diff --git a/addons/gamification/doc/index.rst b/addons/gamification/doc/index.rst index 749689ffc9c..85d4ffe2048 100644 --- a/addons/gamification/doc/index.rst +++ b/addons/gamification/doc/index.rst @@ -18,5 +18,7 @@ A **Badge** is a symbolic token granted to a user as a sign of reward. It can be .. toctree:: :maxdepth: 1 + goal_type + goal gamification_plan_howto \ No newline at end of file diff --git a/addons/gamification/goal_type_data.py b/addons/gamification/goal_type_data.py index 24be886ab75..ccde88e53f0 100644 --- a/addons/gamification/goal_type_data.py +++ b/addons/gamification/goal_type_data.py @@ -21,6 +21,7 @@ from openerp.osv import osv + class gamification_goal_type_data(osv.Model): """Goal type data @@ -30,7 +31,6 @@ class gamification_goal_type_data(osv.Model): """ _inherit = 'gamification.goal.type' -#TODO: is it usefull to have this method in a standalone file? why not directly in the computation field of the related goal type? def number_following(self, cr, uid, xml_id="mail.thread", context=None): """Return the number of 'xml_id' objects the user is following