コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4405 ビュー

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.    

アバター
破棄
最善の回答

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.

アバター
破棄
関連投稿 返信 ビュー 活動
0
2月 18
3084
3
12月 24
5375
1
9月 16
3602
0
10月 15
3778
0
7月 24
1154