diff --git a/addons/gamification/goal.py b/addons/gamification/goal.py
index b78f59a1de0..0986ceaa731 100644
--- a/addons/gamification/goal.py
+++ b/addons/gamification/goal.py
@@ -91,7 +91,7 @@ class gamification_goal_type(osv.Model):
- 'Manually' for user defined values""",
required=True),
'model_id': fields.many2one('ir.model',
- string='Modeel',
+ string='Model',
help='The model object for the field to evaluate' ),
'field_id': fields.many2one('ir.model.fields',
string='Evaluated Field',
@@ -254,15 +254,31 @@ class gamification_goal_plan(osv.Model):
]
def action_start(self, cr, uid, ids, context=None):
+ """Start a draft goal plan
+
+ Change the state of the plan to in progress
+ TODO: generate related goals"""
return self.write(cr, uid, ids, {'state': 'inprogress'}, context=context)
def action_close(self, cr, uid, ids, context=None):
+ """Close a plan in progress
+
+ Change the state of the plan to in done
+ TODO: close the related goals"""
return self.write(cr, uid, ids, {'state': 'done'}, context=context)
def action_cancel(self, cr, uid, ids, context=None):
+ """Cancel a plan in progress
+
+ Change the state of the plan to draft
+ TODO: close the related goals ?"""
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
def action_reset(self, cr, uid, ids, context=None):
+ """Reset a closed goal plan
+
+ Change the state of the plan to in progress
+ TODO: reopen unfinished goals ?"""
return self.write(cr, uid, ids, {'state': 'inprogress'}, context=context)
diff --git a/addons/gamification/view/goal.xml b/addons/gamification/view/goal.xml
index fe2ba27bca3..e582ff853f0 100644
--- a/addons/gamification/view/goal.xml
+++ b/addons/gamification/view/goal.xml
@@ -21,6 +21,7 @@
+
@@ -81,11 +82,15 @@
+
+
+
+
diff --git a/addons/gamification/view/plan.xml b/addons/gamification/view/plan.xml
index bbc5c1b34e9..dc79a6b44fc 100644
--- a/addons/gamification/view/plan.xml
+++ b/addons/gamification/view/plan.xml
@@ -21,6 +21,14 @@
+
+ gamification.goal
+ form
+ Related Goals
+ tree,form
+ {'search_default_plan_id': [active_id], 'default_plan_id': active_id}
+
+
Goal Plan Formgamification.goal.plan
@@ -40,6 +48,12 @@
+
+
+