【发布时间】:2016-03-02 07:16:31
【问题描述】:
目前我正在开发一个模块来预订房间。当用户预订房间时,应自动向管理员发送邮件。为此,我需要在我的电子邮件模板中获取用户公司的电子邮件 ID 和管理员电子邮件 ID。我该怎么做。
这是我的模板..
<record id="send_request" model="email.template">
<field name="name">Request Notification</field>
<field name="email_from">${ }</field>
<field name="subject">Room request </field>
<field name="email_to" >${ }</field>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>STPI Room Request </title>
<style>
span.oe_mail_footer_access {
display:block;
text-align:center;
color:grey;
}
</style>
</head>
<body>
<p>
Dear Sir,
</p>
<br> <p>My company, ${ } would like to use the Room for the specified duration. Kindly concider our request for the use of conference/board room.</p>
<br/>
<p>
Thanks and Regards,
<br/>
${ }
</p>
</body>
</html>
]]>
</field>
</record>
在 email_from 中,我需要获取用户公司电子邮件 ID,在 email_to 中,我需要获取管理员电子邮件 ID。
【问题讨论】:
标签: xml email odoo-8 email-templates