I'm doing a module where one feature is emailing but needs to read the domain and put it in the right place. Below code for example, should write in place with the word HERE where is link.
<record id="employee_leave_request" model="mail.template">
<field name="name">Employee Leave Request</field>
<field name="subject">${object.name}</field>
<field name="model_id" ref="model_hr_holidays"/>
<field name="auto_delete" eval="False"/>
<field name="body_html" ><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">
% if not ctx.get('manager') :
<h4>Dear ${object.employee_id.name},</h4>
% endif
% if ctx.get('manager') :
<h4>Dear ${ctx['manager']},</h4>
${object.employee_id.name} has requested for leave(s).<br/>
% endif
Leave Type : ${object.holiday_status_id.name}<br/>
Reason : ${object.name}<br/>
Number Of Days : From ${object.date_from} To ${object.date_to}, i.e for ${object.number_of_days_temp} day(s)<br/>
Link : http://ift.tt/2vLuniI
</div>
]]>
</field>
</record>
Aucun commentaire:
Enregistrer un commentaire