From abe5859559934be696e96aecee57d7c107fffe7d Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 9 Mar 2016 15:35:29 +0100 Subject: [PATCH] [FIX] gamification: close challenge after expiration Before this patch, the challenges with an end date in the future were closed at the first cron run. opw-669995 --- addons/gamification/models/challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py index 71e3045f4d8..be5fca6197b 100644 --- a/addons/gamification/models/challenge.py +++ b/addons/gamification/models/challenge.py @@ -276,7 +276,7 @@ class gamification_challenge(osv.Model): # close scheduled challenges planned_challenge_ids = self.search(cr, uid, [ ('state', '=', 'inprogress'), - ('end_date', '>=', fields.date.today())]) + ('end_date', '<', fields.date.today())]) if planned_challenge_ids: self.write(cr, uid, planned_challenge_ids, {'state': 'done'}, context=context)