Hi,
How can i add attachments using message_post method in Odoo 13.
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
How can i add attachments using message_post method in Odoo 13.
Thanks
Hi,
Try the following code
attachment_ids = fields.Many2many('ir.attachment', 'doc_warning_rel', 'doc_id', 'attach_id4', string="Attachment")
def your_custom_function(self):
attachments = []
for i in self.attachment_ids:
attachments.append(i.id)
self.message_post(body='your message', partner_ids='your partner ids', attachment_ids=attachments)
Regards
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up