Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
5212 Visualizações

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
Cancelar
Autor

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

Autor Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
jan. 23
1158
0
set. 21
1536
0
jul. 21
4271
1
mar. 21
3709
3
jan. 25
1942