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.

84 lines
2.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo noupdate="0">
  3. <template id="demo_email_hello" name="demo email hello">
  4. <html>
  5. <body>
  6. <!-- TODO: move to LESS file
  7. If we put the link as it is `premailer` won't be able to render it.
  8. To ease this, we could:
  9. 1. find the less file on FS
  10. 2. compile to less
  11. 3. populate style block
  12. -->
  13. <style>
  14. #main_wrapper {
  15. max-width: 620px;
  16. margin: 0 auto;
  17. border: 1px solid #ccc;
  18. font-size: 18px;
  19. font-family: verdana;
  20. color: #6B6E71;
  21. }
  22. a { color: #3BA0A6; text-decoration: none }
  23. #main_header, footer, main > div { padding: 30px 40px }
  24. #main_header table { width: 100% }
  25. #main_header table td { width: 50% }
  26. #main_logo { max-width: 300px }
  27. #main_header .right {
  28. text-align: right;
  29. vertical-align: top;
  30. font-size: 140%;
  31. }
  32. #main_header .date_today { text-transform: uppercase; opacity: 0.7; color: #FF0000 }
  33. footer { padding-top: 0; font-size: 120% }
  34. footer address { font-style: normal }
  35. .greeting { padding-top: 0; padding-bottom: 0 }
  36. .image-wrapper {
  37. min-height: 250px;
  38. }
  39. .image-wrapper.location-map {
  40. margin: 0 -40px;
  41. }
  42. .pt0 { padding-top: 0 }
  43. a.contact { cursor: pointer }
  44. </style>
  45. <div id="main_wrapper">
  46. <div id="main_header">
  47. <table>
  48. <tbody>
  49. <tr>
  50. <td class="left">
  51. <img id="main_logo" t-attf-src="data:image;base64,{{env.user.company_id.logo}}" />
  52. </td>
  53. <td class="right">
  54. <span class="date_today" t-esc="time.strftime('%%d %%B %%Y')" />
  55. </td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. </div>
  60. <main id="main_content">
  61. <div class="greeting">
  62. <p>Hello <span t-field="object.name" />.</p>
  63. </div>
  64. <div id="content">
  65. <p>This e-mail styles are inline rendered although its template defines styles as embedded CSS!</p>
  66. </div>
  67. </main>
  68. <footer id="main_footer">
  69. <div class="company_info">
  70. <p class="website"><a href="https://www.example.com">www.example.com</a></p>
  71. <div class="address">
  72. <div t-field="env.user.company_id.partner_id"
  73. t-options='{
  74. "widget": "contact",
  75. "fields": ["name", "address", "phone", "mobile", "email"]
  76. }'/>
  77. </div>
  78. </div>
  79. </footer>
  80. </div>
  81. </body>
  82. </html>
  83. </template>
  84. </odoo>