Skip to content

Commit

Permalink
[FIX] website_forum: show votes from same forum
Browse files Browse the repository at this point in the history
before this commit, if the user profile is opened
from a particular forum, the votes tab is displaying
the votes from all the forums for this user.

where us, the questions and answers tab is filtering
the data based on the selected forum.

after this commit, the data displayed in the votes
tab will also be filtered based on selected forum,
similar to questions and answers tab.

closes odoo#131487

X-original-commit: ae33d2e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
  • Loading branch information
niyasraphy committed Aug 16, 2023
1 parent 5a8f233 commit abda470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/website_forum/controllers/website_forum.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def _prepare_open_forum_user(self, user, forums, **kwargs):
down_votes = count

# Votes which given by users on others questions and answers.
vote_ids = Vote.search([('user_id', '=', user.id)])
vote_ids = Vote.search([('user_id', '=', user.id), ('forum_id', 'in', forums.ids)])

# activity by user.
comment = Data._xmlid_lookup('mail.mt_comment')[1]
Expand Down

0 comments on commit abda470

Please sign in to comment.