Skip to content
Snippets Groups Projects
Commit cde03e35 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[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#54378

X-original-commit: 1e3483d2
Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent af4b6883
No related branches found
No related tags found
No related merge requests found
......@@ -477,7 +477,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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment