[FIX] mail: clean context for mail_activity feedback
Steps to reproduce: -install projects -go to projects > configuration > check the sub-tasks option -create a project with a sub-task and add an activity on the sub-task Previous behavior: attempting to mark an activity as done directly from the chatter will raise an error similar to "Records does not exist or has been deleted (Record: mail.message (x), User: y)" Current behavior: activity can be marked as done trough the feedback button opw-2126704 closes odoo/odoo#42383 X-original-commit: 06d72a1ab84f3685f547c8a04a2d3e1405e5d188 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -413,6 +413,7 @@ class MailActivity(models.Model):
|
||||
return messages.ids and messages.ids[0] or False
|
||||
|
||||
def action_feedback(self, feedback=False, attachment_ids=None):
|
||||
self = self.with_context(clean_context(self.env.context))
|
||||
messages, next_activities = self._action_done(feedback=feedback, attachment_ids=attachment_ids)
|
||||
return messages.ids and messages.ids[0] or False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user