You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
3.6 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <template id="digest_layout" name="Mail digest layout">
  4. <html>
  5. <body>
  6. <img style="float: right" t-attf-src="data:image;base64,{{env.user.company_id.logo}}" />
  7. <h1 t-if="email_heading"><t t-raw="email_heading" /></h1>
  8. <t t-raw="0" />
  9. <footer t-if="not email_use_user_signature">
  10. <p>
  11. <a t-att-href="env.user.company_id.website">
  12. <t t-esc="env.user.company_id.name" />
  13. </a>
  14. </p>
  15. <p><t t-esc="env.user.company_id.phone" /></p>
  16. </footer>
  17. <footer t-if="email_use_user_signature">
  18. <t t-raw="env.user.signature" />
  19. </footer>
  20. </body>
  21. </html>
  22. </template>
  23. <template id="default_digest_tmpl" name="Mail digest default template">
  24. <t t-call="mail_digest.digest_layout">
  25. <div id="mail_content">
  26. <p>Hello <t t-esc="digest.partner_id.name" />,</p>
  27. <div id="mail_inner_content">
  28. <t t-foreach="grouped_messages.keys()" t-as="gkey">
  29. <t t-set="messages" t-value="grouped_messages[gkey]" />
  30. <t t-if="messages">
  31. <div class="subtype-wrapper"
  32. t-attf-style="marging-bottom:10px;padding-bottom:10px;#{not gkey_last and 'border-bottom:2px solid #aaa;margin-bottom:20px'}">
  33. <t t-set="subtype" t-value="messages[0].subtype_id" />
  34. <h3 style="margin-bottom:5px">
  35. <span t-field="subtype.name" style="font-weight:bold" />
  36. <t t-if="subtype.description">
  37. <span t-field="subtype.description"
  38. style="display:block;margin-top:10px;font-size:80%;color: #777"/>
  39. </t>
  40. </h3>
  41. <t t-foreach="messages" t-as="msg">
  42. <div class="message-wrapper"
  43. t-attf-style="margin:0 10px;padding:5px 10px;#{not msg_first and 'border-top:1px solid #ccc'}">
  44. <t t-raw="digest.message_body(msg)" />
  45. <t t-if="msg.tracking_value_ids">
  46. <h4>Changed values</h4>
  47. <ul class="tracking-values">
  48. <t t-foreach="msg.tracking_value_ids" t-as="tracked">
  49. <li>
  50. <strong class="fname"><span t-field="tracked.field_desc" />:</strong>
  51. <span class="fvalue-old" t-esc="tracked.get_old_display_value()[0]" /> &#8594;
  52. <span class="fvalue-new" t-esc="tracked.get_new_display_value()[0]" />
  53. </li>
  54. </t>
  55. </ul>
  56. </t>
  57. </div>
  58. </t>
  59. </div>
  60. </t>
  61. </t>
  62. </div>
  63. </div>
  64. </t>
  65. </template>
  66. </odoo>