[FIX] gamification: remove import data, add trackvisibility on challenge instead of sending message
bzr revid: mat@openerp.com-20131224145449-93b3z97lagu12yri
This commit is contained in:
parent
be7bc54edc
commit
ff83d9eb4d
|
@ -21,4 +21,3 @@
|
|||
|
||||
import models
|
||||
import wizard
|
||||
import data
|
||||
|
|
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue