summaryrefslogtreecommitdiff
path: root/addons/delivery/data/mail_template_data.xml
diff options
context:
space:
mode:
authorDhawal Limbuwala <dli@odoo.com>2017-07-18 17:59:38 +0200
committerRichard Mathot <rim@odoo.com>2017-07-19 15:02:16 +0200
commitee9b3e0d0c8f20590616287a017d7fe802fc7796 (patch)
tree72a8e056df6faf766d0c3113375d1c2106f93a2f /addons/delivery/data/mail_template_data.xml
parentf858cea1faa0c707ac9732e6745c6962d2a87b2b (diff)
[IMP] delivery: notification email for shippings
When an order is shipped, a notification email is sent to the customer. If there is a tracking URL, it is included in the email. (and also a bit of refactoring)
Diffstat (limited to 'addons/delivery/data/mail_template_data.xml')
-rw-r--r--addons/delivery/data/mail_template_data.xml89
1 files changed, 89 insertions, 0 deletions
diff --git a/addons/delivery/data/mail_template_data.xml b/addons/delivery/data/mail_template_data.xml
new file mode 100644
index 00000000000..7f06198d9a9
--- /dev/null
+++ b/addons/delivery/data/mail_template_data.xml
@@ -0,0 +1,89 @@
+<?xml version='1.0' encoding='utf-8'?>
+<odoo>
+ <data noupdate="1">
+ <record id="mail_template_data_delivery_confirmation" model="mail.template">
+ <field name="name">Delivery: Send by Email</field>
+ <field name="subject">${object.company_id.name} Delivery Order (Ref ${object.name or 'n/a' })</field>
+ <field name="partner_to">${object.partner_id.id}</field>
+ <field name="model_id" ref="delivery.model_stock_picking"/>
+ <field name="report_template" ref="stock.action_report_delivery"/>
+ <field name="report_name">${(object.name or '').replace('/','_')}</field>
+ <field name="lang">${object.partner_id.lang}</field>
+ <field name="body_html" type="xml">
+<p>Dear ${object.partner_id.name},</p>
+<p>We are glad to inform you that your order has been shipped.</p>
+<p>
+%if object.carrier_tracking_ref:
+ Your tracking reference:
+ %if object.carrier_tracking_url:
+ <a href="${object.carrier_tracking_url}" target="_blank">${object.carrier_tracking_ref}</a>.
+ %else:
+ ${object.carrier_tracking_ref}.
+ %endif
+%endif
+</p>
+<p>Find your delivery order attached for more details.</p>
+<p>Thank you,</p>
+ </field>
+ </record>
+ <!--Email Notification template for Delivery-->
+ <record id="mail_template_data_delivery_notification" model="mail.template">
+ <field name="name">Delivery: Custom Notification Email</field>
+ <field name="subject">${object.subject}</field>
+ <field name="model_id" ref="mail.model_mail_message"/>
+ <field name="auto_delete" eval="True"/>
+ <field name="body_html" type="xml">
+ <table border="0" width="100%" cellpadding="0" bgcolor="#ededed" style="font-family:Arial,Helvetica,sans-serif; padding: 20px; background-color: #ededed" summary="o_mail_notification">
+ <tbody>
+ <!-- HEADER -->
+ <tr>
+ <td align="center" style="min-width: 590px;">
+ <table width="650" border="0" cellpadding="0" bgcolor="#875A7B" style="min-width: 590px; background-color: rgb(135,90,123); padding: 20px;">
+ <tr>
+ <td valign="middle">
+ <span style="font-size:20px; color:white; font-weight: bold;">${object.record_name}</span>
+ </td>
+ <td valign="middle" align="right">
+ <img src="/logo.png" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${user.company_id.name}"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- CONTENT -->
+ <tr>
+ <td align="center" style="min-width: 590px;">
+ <table width="650" border="0" cellpadding="0" bgcolor="#ffffff" style="min-width: 590px; background-color: rgb(255, 255, 255); padding: 20px;">
+ <tbody>
+ <td valign="top" style="color: #555; font-size: 14px;">${object.body | safe}</td>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <!-- FOOTER -->
+ <tr>
+ <td align="center" style="min-width: 590px;">
+ <table width="650" border="0" cellpadding="0" bgcolor="#875A7B" style="min-width: 590px; background-color: rgb(135,90,123); padding: 20px;">
+ <tr>
+ <td valign="middle" align="left" style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;">${user.company_id.name}<br/>${user.company_id.phone or ''}</td>
+ <td valign="middle" align="right" style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;">
+ % if user.company_id.email:
+ <a href="mailto:${user.company_id.email}" style="text-decoration:none; color: white;">${user.company_id.email}</a><br/>
+ % endif
+ % if user.company_id.website:
+ <a href="${user.company_id.website}" style="text-decoration:none; color: white;">${user.company_id.website}</a>
+ % endif
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center">Powered by <a href="https://www.odoo.com">Odoo</a>.</td>
+ </tr>
+ </tbody>
+ </table>
+ </field>
+ </record>
+ </data>
+</odoo>