我知道这听起来很奇怪
但是有没有办法从Odoo的网站模块发送带有特定模板的电子邮件呢?
我的意思是,假设我在网站上有一个按钮,这个按钮应该在后端调用一个模板并自动发送电子邮件。
有什么值得我去找的例子吗?
我寻找过website_crm、website_form和website_blog,但我没有看到任何这样的例子。
发布于 2017-05-09 06:39:05
@api.model
def send_mail_function(self):
template_id = self.env.ref('custom_crm.mail_template_id')
if template_id:
template_id.send_mail(self.id, force_send=True)
return Truehttps://stackoverflow.com/questions/43860456
复制相似问题