[FIX] gamification: Refresh Challenge
When clicking on the button "Refresh Challenge" in the "gamification.challenge" view form, all the "gamification.goal" records linked to this challenge must be updated. opw:647983
This commit is contained in:
parent
ed214a6681
commit
96be5b404a
|
@ -380,6 +380,9 @@ class gamification_challenge(osv.Model):
|
|||
|
||||
Create goals that haven't been created yet (eg: if added users)
|
||||
Recompute the current value for each goal related"""
|
||||
goal_obj = self.pool['gamification.goal']
|
||||
goal_ids = goal_obj.search(cr, uid, [('challenge_id', 'in', ids), ('state', '=', 'inprogress')], context=context)
|
||||
goal_obj.unlink(cr, uid, goal_ids, context=context)
|
||||
return self._update_all(cr, uid, ids=ids, context=context)
|
||||
|
||||
def action_report_progress(self, cr, uid, ids, context=None):
|
||||
|
|
Loading…
Reference in New Issue