From fd5516ade8409bcec2eb60ea9337769a6c3307f6 Mon Sep 17 00:00:00 2001 From: Gaurav Panchal Date: Tue, 5 Aug 2014 12:11:21 +0530 Subject: [PATCH] [FIX] website_forum: issue in biography (unnecessary tags added by editor) + menu control (Users / My Profile) --- addons/website_forum/controllers/main.py | 5 ++++- addons/website_forum/views/website_forum.xml | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index 8bda6b5393e..e80f7316d04 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -496,7 +496,10 @@ class WebsiteForum(http.Controller): posts_ids = Post.browse(cr, uid, posts.keys(), context=context) posts = dict(map(lambda x: (x.id, (x.parent_id or x, x.parent_id and x or False)), posts_ids)) - post['users'] = 'True' + if user.id is uid: + post['my_profile'] = 'True' + else: + post['users'] = 'True' values.update({ 'uid': uid, diff --git a/addons/website_forum/views/website_forum.xml b/addons/website_forum/views/website_forum.xml index c40b2eac00b..5fa5c6530ca 100644 --- a/addons/website_forum/views/website_forum.xml +++ b/addons/website_forum/views/website_forum.xml @@ -72,7 +72,7 @@ Badges
  • - My Profile + My Profile
  • +