summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2020-07-13 08:27:55 +0000
committerMartin Trigaux <mat@odoo.com>2020-07-13 12:07:19 +0000
commit49fc197925f44b0ffd09ca7a821f5e7ac5476b68 (patch)
treea1a6fcbb562c785a605bc517d0d6f45b8101ed38 /addons
parenteb99a019ed6eb689cd06cf595c06e8ffe4e120b1 (diff)
[FIX] gamification: use right field on goal domain
There is no field 'ids' on a gamification.goal, but one called 'id' Without this commit, calling _get_serialized_challenge_lines (or indirectly, calling report_progress) with a non-empty subset_goals was failing due to an invalid domain. This is not supposed to happen on standard flow but can be triggered with manual modification of date fields and refreshing a challenge. Fixes odoo/odoo#25913 closes odoo/odoo#54387 X-original-commit: 1e3483d2fc99763940396936758cf99b14d0a118 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons')
-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 b2f9289303e..2a1be3c6b88 100644
--- a/addons/gamification/models/challenge.py
+++ b/addons/gamification/models/challenge.py
@@ -472,7 +472,7 @@ class Challenge(models.Model):
('state', '!=', 'draft'),
]
if restrict_goals:
- domain.append(('ids', 'in', restrict_goals.ids))
+ domain.append(('id', 'in', restrict_goals.ids))
else:
# if no subset goals, use the dates for restriction
if start_date: