[FIX] website_blog: remove uid from context value and use user_id
authorChristophe Matthieu <chm@openerp.com>
Mon, 30 Sep 2013 07:10:22 +0000 (09:10 +0200)
committerChristophe Matthieu <chm@openerp.com>
Mon, 30 Sep 2013 07:10:22 +0000 (09:10 +0200)
bzr revid: chm@openerp.com-20130930071022-qijjrr1tfn66tytl

addons/website_blog/controllers/main.py
addons/website_blog/views/website_blog_templates.xml

index 86cfdf8..9dd552c 100644 (file)
@@ -143,7 +143,6 @@ class website_mail(http.Controller):
             'blog_posts': blog_posts,
             'pager': pager,
             'nav_list': nav,
-            'uid': request.uid,
             'unable_editor': post.get('unable_editor')
         }
 
index 947150c..81a87cb 100644 (file)
@@ -91,7 +91,7 @@
             <h4>Leave a Comment</h4>
             <form id="comment" t-attf-action="/blog/#{blog_post.category_id.id}/#{blog_post.id}/post#post"
                     method="POST">
-                <img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.users&amp;field=image_small&amp;id='+str(uid)" style="width: 50px; margin-right: 10px;"/>
+                <img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
                 <div class="pull-left" style="width: 75%%">
                     <textarea rows="3" class="form-control" placeholder="Write a comment..."></textarea>
                     <button type="submit" class="btn btn-danger mt8">Post</button>