mail_template_data.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="mail_template_gift_card" model="mail.template">
  4. <field name="name">Gift Card: Gift Card Information</field>
  5. <field name="model_id" ref="model_loyalty_card"/>
  6. <field name="subject">Your Gift Card at {{ object.company_id.name }}</field>
  7. <field name="partner_to">{{ object._get_mail_partner().id }}</field>
  8. <field name="lang">{{ object._get_mail_partner().lang }}</field>
  9. <field name="description">Sent to customer who purchased a gift card</field>
  10. <field name="body_html" type="html">
  11. <div style="background: #ffffff">
  12. <div style="margin:0px; font-size:24px; font-family:arial, 'helvetica neue', helvetica, sans-serif; line-height:36px; color:#333333; text-align: center">
  13. Here is your gift card!
  14. </div>
  15. <div style="padding-top:20px; padding-bottom:20px">
  16. <img src="/loyalty/static/img/gift_card.png" style="display:block; border:0; outline:none; text-decoration:none; margin:auto;" width="300"/>
  17. </div>
  18. <div style="padding:0; margin:0px; padding-top:35px; padding-bottom:35px; text-align:center;">
  19. <h3 style="margin:0px; line-height:48px; font-family:arial, 'helvetica neue', helvetica, sans-serif; font-size:40px; font-style:normal; font-weight:normal; color:#333333; text-align:center">
  20. <strong t-out="format_amount(object.points, object.currency_id) or ''">$ 150.00</strong></h3>
  21. </div>
  22. <div style="padding:0; margin:0px; padding-top:35px; padding-bottom:35px; background-color:#efefef; text-align:center;">
  23. <p style="margin:0px; font-size:14px;font-family:arial, 'helvetica neue', helvetica, sans-serif; line-height:21px; color:#333333">
  24. <strong>Gift Card Code</strong>
  25. </p>
  26. <p style="margin:0px; font-size:25px;font-family:arial, 'helvetica neue', helvetica, sans-serif; line-height:38px; color:#A9A9A9" t-out="object.code or ''">4f10-15d6-41b7-b04c-7b3e</p>
  27. </div>
  28. <div t-if="object.expiration_date" style="padding:0; margin:0px; padding-top:10px; padding-bottom:10px; text-align:center;">
  29. <h3 style="margin:0px; line-height:17px; font-family:arial, 'helvetica neue', helvetica, sans-serif; font-size:14px; font-style:normal; font-weight:normal; color:#A9A9A9; text-align:center">Card expires <t t-out="format_date(object.expiration_date) or ''">05/05/2021</t></h3>
  30. </div>
  31. <div style="padding:20px; margin:0px; text-align:center;">
  32. <span style="background-color:#999999; display:inline-block; width:auto; border-radius:5px;">
  33. <a t-attf-href="{{ object.get_base_url() }}/shop" target="_blank" style="text-decoration:none; font-family:arial, 'helvetica neue', helvetica, sans-serif; font-size:22px; color:#FFFFFF; border-style:solid; border-color:#999999; border-width:20px 30px; display:inline-block; background-color:#999999; border-radius:5px; font-weight:bold; font-style:normal; line-height:26px; width:auto; text-align:center">Use it right now!</a>
  34. </span>
  35. </div>
  36. </div>
  37. </field>
  38. <field name="report_template" ref="loyalty.report_gift_card"/>
  39. <field name="report_name">Your Gift Card</field>
  40. <field name="auto_delete" eval="True"/>
  41. </record>
  42. <record id="mail_template_loyalty_card" model="mail.template">
  43. <field name="name">Coupon: Coupon Information</field>
  44. <field name="model_id" ref="loyalty.model_loyalty_card"/>
  45. <field name="subject">Your reward coupon from {{ object.program_id.company_id.name }} </field>
  46. <field name="email_from">{{ object.program_id.company_id.email }}</field>
  47. <field name="partner_to">{{ object._get_mail_partner().id }}</field>
  48. <field name="lang">{{ object._get_mail_partner().lang }}</field>
  49. <field name="description">Sent to customer with coupon information</field>
  50. <field name="body_html" type="html">
  51. <table border="0" cellpadding="0" cellspacing="0" style="width:100%; margin:0px auto; background:#ffffff; color:#333333;"><tbody>
  52. <tr>
  53. <td valign="top" style="text-align: center; font-size: 14px;">
  54. <t t-if="object._get_mail_partner().name">
  55. Congratulations <t t-out="object._get_mail_partner().name or ''">Brandon Freeman</t>,<br />
  56. </t>
  57. Here is your reward from <t t-out="object.program_id.company_id.name or ''">YourCompany</t>.<br />
  58. <t t-foreach="object.program_id.reward_ids" t-as="reward">
  59. <t t-if="reward.required_points &lt;= object.points">
  60. <span style="font-size: 50px; color: #875A7B; font-weight: bold;" t-esc="reward.description">Reward Description</span>
  61. <br/>
  62. </t>
  63. </t>
  64. </td>
  65. </tr>
  66. <tr style="margin-top: 16px">
  67. <td valign="top" style="text-align: center; font-size: 14px;">
  68. Use this promo code
  69. <t t-if="object.expiration_date">
  70. before <t t-out="object.expiration_date or ''">2021-06-16</t>
  71. </t>
  72. <p style="margin-top: 16px;">
  73. <strong style="padding: 16px 8px 16px 8px; border-radius: 3px; background-color: #F1F1F1;" t-out="object.code or ''">15637502648479132902</strong>
  74. </p>
  75. <t t-foreach="object.program_id.rule_ids" t-as="rule">
  76. <t t-if="rule.minimum_qty not in [0, 1]">
  77. <span style="font-size: 14px;">
  78. Minimum purchase of <t t-out="rule.minimum_qty or ''">10</t> products
  79. </span><br />
  80. </t>
  81. <t t-if="rule.minimum_amount != 0.00">
  82. <span style="font-size: 14px;">
  83. Valid for purchase above <t t-out="rule.company_id.currency_id.symbol or ''">$</t><t t-out="'%0.2f' % float(rule.minimum_amount) or ''">10.00</t>
  84. </span><br />
  85. </t>
  86. </t>
  87. <br/>
  88. Thank you,
  89. <t t-if="object._get_signature()">
  90. <br />
  91. <t t-out="object._get_signature() or ''">--<br/>Mitchell Admin</t>
  92. </t>
  93. </td>
  94. </tr>
  95. </tbody></table>
  96. </field>
  97. <field name="report_template" ref="loyalty.report_loyalty_card"/>
  98. <field name="report_name">Your Coupon Code</field>
  99. <field name="auto_delete" eval="True"/>
  100. </record>
  101. </odoo>