跳至內容
選單
此問題已被標幟
1 回覆
2826 瀏覽次數

Using a scheduled task, I need to send an email which will inform on the status of open tasks. After getting the recordset correponding to my search, I found how to load the template and send the email:

mail_template = self.env.ref('test_email.email_template')
mail_template.send_mail(self.id)

But I only got access to the current record in $object. I would like to be able to pass the recordset to the template and loop over it. 

頭像
捨棄
作者 最佳答案

Easy way is to pass the recordset using context. Go thanks and upvote CZoellner

https://stackoverflow.com/questions/71559930/


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
2月 24
2497
1
7月 23
3398
1
5月 22
4434
3
12月 23
19125
1
2月 22
6145