跳至內容
選單
此問題已被標幟
2964 瀏覽次數

I have created a cronjob to download files in my custom model google_drive_scanner to create new applicants from google drive files. I want to send notification to reviewer in hr.job table but when I create it doesn't link to my hr.applicant.

self.env['mail.message'].create({
    'message_type': "notification",
    "subtype": self.env.ref("mail.mt_comment").id,
    'body': body,
    'subject': subject,
    'needaction_partner_ids': action_partner,
    'model': self._name, #hr.applicant model
    'res_id': self.id  #what res_id
})
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
3月 19
2968
0
3月 19
3756
1
10月 21
10747
0
10月 21
2034
5
7月 25
2354