Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2840 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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

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


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
feb 24
2501
1
lug 23
3406
1
mag 22
4451
3
dic 23
19129
1
feb 22
6152