Skip to content

Commit

Permalink
Merge PR OCA#3027 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Sep 6, 2024
2 parents 86b4dee + e85348b commit 1a633a6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tracking_manager/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ def _tm_post_message(self, data):
}
for field_name, messages in messages_by_field.items()
]
# use sudo as user may not have access to mail.message
record.sudo().message_post_with_source(
# We do not use message_post_with_view() because emails would be sent
rendered_template = self.env["ir.qweb"]._render(
"tracking_manager.track_o2m_m2m_template",
render_values={"lines": messages},
subtype_xmlid="mail.mt_note",
{"lines": messages, "object": record},
minimal_qcontext=True,
)
record._message_log(body=rendered_template)

def _tm_prepare_o2m_tracking(self):
fnames = self._tm_get_fields_to_track()
Expand Down

0 comments on commit 1a633a6

Please sign in to comment.