Discuss Update

This commit is contained in:
Pranay 2025-05-22 13:43:39 +05:30 committed by raman
parent 995688ad8e
commit d2f1caf810
1 changed files with 4 additions and 2 deletions

View File

@ -27,9 +27,11 @@ class DiscussChannel(models.Model):
'res_id': rec.id, 'res_id': rec.id,
}) })
files.append(file.id) files.append(file.id)
rec.message_post( msg = rec.message_post(
body=leave_request_data['body'], body=leave_request_data['body'],
message_type="comment", message_type="comment",
subtype_xmlid="mail.mt_comment", subtype_xmlid="mail.mt_comment",
attachment_ids=files # ✅ correct way to pass existing attachments attachment_ids=files # ✅ correct way to pass existing attachments
) )
return msg.id