This question has been flagged
2 Replies
3655 Views

Hi there,

Can someone help to add internal notes to a contact using the API? (at the bottom of the mage, also known as message)


What models should I use for this? To make them show under in the contact section I have to use res.partner model but I can't figure out which field I have to update or method to use in order to add notes


Regards


Avatar
Discard
Author

hi @Ray_Carnes, thanks for that, but I'm having a hard time findignthe sections where an attachment is used inside a messagehow can I acomplish this using the external API? can you give me an example? I found this https://stackoverflow.com/questions/57653365/how-to-create-new-attachments-in-odoo-how-do-they-work but seems confusing

Author Best Answer

Hi I figure that I had to do the following

models.execute_kw(db, uid, pwd, 'mail.message', 'create', [{ 'model': 'res.partner', 'res_id': id, 'body': "This note was made using the API 2", 'author_id': uid, 'create_date': datetimestring, 'date': datetimestring, 'write_date': datetimestring 'attachment_ids':[]}])

Does anyone know how to add attachments to the messages?


I was also able to attacht files, thank all! this Q is solved

Avatar
Discard