diff options
Diffstat (limited to 'addons/website_forum/models')
| -rw-r--r-- | addons/website_forum/models/forum.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/website_forum/models/forum.py b/addons/website_forum/models/forum.py index b2673a24351..4ec595516a5 100644 --- a/addons/website_forum/models/forum.py +++ b/addons/website_forum/models/forum.py @@ -422,12 +422,13 @@ class Post(models.Model): return post @api.model - def check_mail_message_access(self, res_ids, operation, model_name=None): + def get_mail_message_access(self, res_ids, operation, model_name=None): + # XDO FIXME: to be correctly fixed with new get_mail_message_access and filter access rule if operation in ('write', 'unlink') and (not model_name or model_name == 'forum.post'): # Make sure only author or moderator can edit/delete messages if any(not post.can_edit for post in self.browse(res_ids)): raise KarmaError('Not enough karma to edit a post.') - return super(Post, self).check_mail_message_access(res_ids, operation, model_name=model_name) + return super(Post, self).get_mail_message_access(res_ids, operation, model_name=model_name) @api.multi def write(self, vals): @@ -805,14 +806,14 @@ class Post(models.Model): return super(Post, self).message_post(message_type=message_type, **kwargs) @api.multi - def _notify_customize_recipients(self, message, msg_vals, recipients_vals): + def _notify_customize_recipients(self, message, msg_vals): """ Override to avoid keeping all notified recipients of a comment. We avoid tracking needaction on post comments. Only emails should be sufficient. """ msg_type = msg_vals.get('message_type') or message.message_type if msg_type == 'comment': return {'needaction_partner_ids': [], 'partner_ids': []} - return {} + return super(Post, self)._notify_customize_recipients(message, msg_vals) class PostReason(models.Model): |
