From 8615272b2c1a522d6363b83f92b6e3d5c85c998d Mon Sep 17 00:00:00 2001 From: "Sunil Sharma (OpenERP)" Date: Tue, 18 Mar 2014 16:42:29 +0530 Subject: [PATCH] [imp]:improve user vote tab bzr revid: sunilsharma.sharma07@gmail.com-20140318111229-70nqzgul8d4y21e0 --- addons/website_forum/controllers/main.py | 6 +++++- addons/website_forum/views/website_forum.xml | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index 64f36fc48c4..2ae8161fd92 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -161,6 +161,9 @@ class website_forum(http.Controller): question_ids = Post.search(cr, uid, [('forum_id', '=', forum.id), ('create_uid', '=', user.id), ('parent_id', '=', False)], context=context) user_questions = Post.browse(cr, uid, question_ids, context=context) + + post_votes = Vote.search(cr, uid, [('user_id', '=', uid)], context=context) + vote_ids = Vote.browse(cr, uid, post_votes, context=context) #showing questions in which user answered obj_ids = Post.search(cr, uid, [('forum_id', '=', forum.id), ('create_uid', '=', user.id), ('parent_id', '!=', False)], context=context) @@ -196,7 +199,8 @@ class website_forum(http.Controller): 'up_votes': up_votes, 'down_votes': down_votes, 'activities': activities, - 'posts': posts + 'posts': posts, + 'vote_post':vote_ids, } return request.website.render("website_forum.user_detail_full", values) diff --git a/addons/website_forum/views/website_forum.xml b/addons/website_forum/views/website_forum.xml index 1b802de9aba..9f515ec0dc3 100644 --- a/addons/website_forum/views/website_forum.xml +++ b/addons/website_forum/views/website_forum.xml @@ -649,6 +649,9 @@
  • Followed Question
  • +
  • + Votes +
  • @@ -669,6 +672,9 @@

    Followed Questions

    +
    + +
    • @@ -707,5 +713,18 @@
    +