Skip to Content
Menu
This question has been flagged
2 Replies
5204 Rodiniai

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


Portretas
Atmesti
Autorius

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

Autorius 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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
saus. 23
1153
0
rugs. 21
1536
0
liep. 21
4266
1
kov. 21
3707
3
saus. 25
1925