Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3174 Widoki

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. 

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

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


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lut 24
3116
1
lip 23
4009
1
maj 22
4919
3
gru 23
19533
1
lut 22
6688