diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-12-24 15:54:49 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-12-24 15:54:49 +0100 |
| commit | ff83d9eb4df60ff0fce9ae540bb88ef29a9f9676 (patch) | |
| tree | 61b180ec1882c371215bed0d7ebcf461600c6363 /addons | |
| parent | be7bc54edc2fcc0abb94450d22f37ae4d4b11dce (diff) | |
[FIX] gamification: remove import data, add trackvisibility on challenge instead of sending message
bzr revid: mat@openerp.com-20131224145449-93b3z97lagu12yri
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/gamification/__init__.py | 1 | ||||
| -rw-r--r-- | addons/gamification/models/challenge.py | 7 |
2 files changed, 2 insertions, 6 deletions
diff --git a/addons/gamification/__init__.py b/addons/gamification/__init__.py index 5fff27fedfe..21f9c9491ac 100644 --- a/addons/gamification/__init__.py +++ b/addons/gamification/__init__.py @@ -21,4 +21,3 @@ import models import wizard -import data diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py index 12f1b62c6fb..5bbee5bbede 100644 --- a/addons/gamification/models/challenge.py +++ b/addons/gamification/models/challenge.py @@ -124,8 +124,7 @@ class gamification_challenge(osv.Model): ('inprogress', 'In Progress'), ('done', 'Done'), ], - string='State', - required=True), + string='State', required=True, track_visibility='onchange'), 'manager_id': fields.many2one('res.users', string='Responsible', help="The user responsible for the challenge."), @@ -250,9 +249,7 @@ class gamification_challenge(osv.Model): for challenge in self.browse(cr, uid, ids, context=context): if challenge.autojoin_group_id: vals['user_ids'] += [(4, user.id) for user in challenge.autojoin_group_id.users] - if challenge.state == 'draft': - # going from draft to inprogress - self.message_post(cr, uid, challenge.id, body="New challenge started.", context=context) + self.generate_goals_from_challenge(cr, uid, ids, context=context) elif vals.get('state') == 'done': |
