From 697d90e658078303bb38f87ff5bc9ff19779350f Mon Sep 17 00:00:00 2001 From: "jerome hanke (jhk)" Date: Wed, 18 Dec 2019 14:43:55 +0000 Subject: [PATCH] [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) --- addons/mail/models/mail_activity.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mail/models/mail_activity.py b/addons/mail/models/mail_activity.py index d1e1941f163..00857451c5f 100644 --- a/addons/mail/models/mail_activity.py +++ b/addons/mail/models/mail_activity.py @@ -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