Ir al contenido
Menú
Se marcó esta pregunta
2774 Vistas

Hello everyone,

I am currently working on automating some processes for candidate management.

I am running locally Odoo 14 with Recruitment all installed. Also, Gmail is configured as my external mail server.


I was able to retrieve the list of the candidates("hr.applicant" model) and also retrieve the email chain from them.

However, I am not able to send them an email.

I tried the following code, but it adds it as a note only.

models.execute_kw(db, uid, password,
'mail.mail', 'create',
[{
'add_sign': True,
'attachment_ids': [],
'author_id': 3,
'body': '<p>Hello John, this is a custom email 3</p>',
'create_uid': [2, 'Administrator'],
'display_name': 'John',
'message_type': 'email',
'model': 'hr.applicant',
'no_auto_thread': False,
#'notified_partner_ids': [8],
'parent_id': 24,
'partner_ids': [8],
'record_name': 'John',
}])


also tried "mail.compose.message" model, but I did not see neither the note in the web interface, neither the email on my test applicant.


Am I doing something wrong?


Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
jul 25
2960
1
oct 24
2149
1
abr 24
2208
0
feb 24
1545
0
sept 23
1685