bemade-addons/price_update_notifications/data/email_templates.xml
2025-05-29 21:35:47 -04:00

61 lines
No EOL
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="mail_template_price_update" model="mail.template">
<field name="name">Product Price Update</field>
<field name="model_id"
ref="price_update_notifications.model_price_notice_mailing"/>
<field name="subject">
{{ object.partner_id.company_id.name }} Price Update
Notification -
Effective {{ object.effective_date.strftime("%Y-%m-%d") }}
</field>
<field name="description">Sent using the send price update letter action on partners.</field>
<field name="email_from">
{{ object.partner_id.company_id.email}}
</field>
<field name="email_to">{{ object.email }}</field>
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px" id="intro">
<p>Dear <span t-field="object.partner_id.name"/>,</p>
<p>We have recently updated the pricing for the following
products you have purchased or requested pricing for in the past
year. Please take note that these prices will be effective as of
<span t-out="object.effective_date.strftime('%Y-%m-%d')"/>.
</p>
</div>
<t t-set="company"
t-value="object.partner_id.company_id or object.env.company"/>
<div id="table">
<table class="table" style="width: 100%; border-collapse: collapse; font-family: Arial, sans-serif;">
<thead style="background-color: #f2f2f2; text-align: left;">
<tr>
<th style="padding: 8px; border-bottom: 2px solid #ddd;">Product</th>
<th style="padding: 8px; border-bottom: 2px solid #ddd;">Unit</th>
<th style="padding: 8px; border-bottom: 2px solid #ddd; text-align: right;">Unit Price</th>
<th style="padding: 8px; border-bottom: 2px solid #ddd;">Currency</th>
</tr>
</thead>
<tbody>
<tr t-foreach="object.line_ids" t-as="line" t-attf-style="background-color: {{ line_index % 2 == 0 and '#f9f9f9' or '#ffffff' }};">
<td style="padding: 8px; border-bottom: 1px solid #ddd;">
<span t-field="line.product_id.display_name"/>
</td>
<td style="padding: 8px; border-bottom: 1px solid #ddd;">
<span t-field="line.product_id.uom_id.display_name"/>
</td>
<td style="padding: 8px; border-bottom: 1px solid #ddd; text-align: right;">
<span t-field="line.price" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
</td>
<td style="padding: 8px; border-bottom: 1px solid #ddd;">
<span t-field="line.currency_id.name"/>
</td>
</tr>
</tbody>
</table>
<p>Best regards,</p>
<p>The <span t-out="company.name"/> team.</p>
</div>
</field>
</record>
</odoo>