Skip to Content
Menu
This question has been flagged
2803 Rodiniai

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?


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
3
liep. 25
2975
1
spal. 24
2173
1
bal. 24
2230
0
vas. 24
1553
0
rugs. 23
1729