[FIX] website_forum: convert answer to comment, use superuser
To browse the forum post, as the partner of the create_uid of the post is needed, which can't be read by portal users.
This commit is contained in:
parent
fd4f6efe1b
commit
a8d667eeb7
|
@ -420,7 +420,7 @@ class Post(osv.Model):
|
||||||
""" Tools to convert an answer (forum.post) to a comment (mail.message).
|
""" Tools to convert an answer (forum.post) to a comment (mail.message).
|
||||||
The original post is unlinked and a new comment is posted on the question
|
The original post is unlinked and a new comment is posted on the question
|
||||||
using the post create_uid as the comment's author. """
|
using the post create_uid as the comment's author. """
|
||||||
post = self.browse(cr, uid, id, context=context)
|
post = self.browse(cr, SUPERUSER_ID, id, context=context)
|
||||||
if not post.parent_id:
|
if not post.parent_id:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue