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
4693 Widoki

Hello All,

I've created my own email template and email sever both are created.

Now how can i send an email to customer from python method?

I've follow some example of v8 api which are not working for me.

Any example which can help me to achieve this feature on v9

I tried but getting this error?

self.ensure_one()
 raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: mail.template()

Thank you.

Prince.    

Awatar
Odrzuć
Najlepsza odpowiedź

Hello Prince,

Try to use this code.

template=self.env.ref('External_ID_of_email_template')

template.send_mail(self.id,force_send=True)


Hope this helps.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lut 18
3288
3
gru 24
5702
1
wrz 16
3806
0
paź 15
4002
0
wrz 25
209