summaryrefslogtreecommitdiff
path: root/addons/gamification/models
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2016-03-09 15:35:29 +0100
committerMartin Trigaux <mat@odoo.com>2016-03-10 09:26:17 +0100
commitabe5859559934be696e96aecee57d7c107fffe7d (patch)
tree52245fe20c585e3e7c9acf14ddd89a9c0942dcff /addons/gamification/models
parent560e5eec1523ded60e5bd748bd0ce1325dadad3b (diff)
[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
Diffstat (limited to 'addons/gamification/models')
-rw-r--r--addons/gamification/models/challenge.py2
1 files changed, 1 insertions, 1 deletions
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)