Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2837 Näkymät

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. 

Avatar
Hylkää
Tekijä Paras vastaus

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

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


Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
helmik. 24
2499
1
heinäk. 23
3404
1
toukok. 22
4444
3
jouluk. 23
19127
1
helmik. 22
6148