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.

156 lines
7.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Mail template are declared in a NOUPDATE block
  4. so users can freely customize/delete them -->
  5. <data noupdate="0">
  6. <!-- TODO: improve with Jinja2 comparaison operators in v12.0 -->
  7. <record id="email_template_non_attendance" model="mail.template">
  8. <field name="name">Shift Non-attendance</field>
  9. <field name="subject">Non-attendance to your last shift.</field>
  10. <field name="partner_to">${object.replaced_id.id or object.worker_id.id|safe}</field>
  11. <field name="model_id" ref="model_beesdoo_shift_shift"/>
  12. <field name="auto_delete" eval="True"/>
  13. <field name="lang">${object.worker_id.lang}</field>
  14. <field name="body_html"><![CDATA[
  15. <div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
  16. <p>Hello ${object.replaced_id.name or object.worker_id.name},
  17. <br><br>You have been recorded as non-attended during your last shift (${format_tz(object.start_time,object.replaced_id.tz or 'Europe/Brussels','%d.%m.%Y - %H:%M')}).
  18. % if object.worker_id.working_mode == 'regular':
  19. % if object.state == 'absent_0':
  20. <br><br>The supercooperator assigned you 0 compensation shift.
  21. % endif
  22. % if object.state == 'absent_1':
  23. <br><br>The supercooperator assigned you 1 compensation shift.
  24. % endif
  25. % if object.state == 'absent_2':
  26. <br><br>The supercooperator assigned you 2 compensation shifts.
  27. % endif
  28. % if object.replaced_id:
  29. You have to do ${(object.replaced_id.cooperative_status_ids.sr + object.replaced_id.cooperative_status_ids.sc) * -1 } shifts before your next regular shift.<br>
  30. % else:
  31. You have to do ${(object.worker_id.cooperative_status_ids.sr + object.worker_id.cooperative_status_ids.sc) * -1 } shifts before your next regular shift.<br>
  32. % endif
  33. % endif
  34. % if object.worker_id.working_mode == 'irregular':
  35. Your shift counter is at ${object.worker_id.cooperative_status_ids.sr} and should
  36. be superior or equal to 1 before the
  37. ${object.worker_id.cooperative_status_ids.future_alert_date}.<br>
  38. % endif
  39. % if object.replaced_id:
  40. You were supposed to replace ${object.worker_id.name} and your
  41. current status is "${object.replaced_id.cooperative_status_ids.get_status_value()}".
  42. % else:
  43. <br><br>Your current status is "${object.worker_id.cooperative_status_ids.get_status_value()}".
  44. % endif
  45. <br>If you have any question regarding this non-attendance, just answer this e-mail.
  46. </p>
  47. <br>
  48. <p>Cooperatively yours,<br>
  49. The Members' office volunteers</p>
  50. <p>${object.worker_id.company_id.name}.</p>
  51. % if object.worker_id.company_id.street:
  52. ${object.worker_id.company_id.street}
  53. % endif
  54. % if object.worker_id.company_id.street2:
  55. ${object.worker_id.company_id.street2}<br>
  56. % endif
  57. % if object.worker_id.company_id.city or object.worker_id.company_id.zip:
  58. ${object.worker_id.company_id.zip} ${object.worker_id.company_id.city}<br>
  59. % endif
  60. % if object.worker_id.company_id.country_id:
  61. ${object.worker_id.company_id.state_id and ('%s, ' % object.worker_id.company_id.state_id.name) or ''} ${object.worker_id.company_id.country_id.name or ''}<br>
  62. % endif
  63. % if object.worker_id.company_id.phone:
  64. Phone:&nbsp; ${object.worker_id.company_id.phone}
  65. % endif
  66. % if object.worker_id.company_id.website:
  67. <div>
  68. Web :&nbsp;<a href="${object.worker_id.company_id.website}">${object.worker_id.company_id.website}</a>
  69. </div>
  70. %endif
  71. % if object.worker_id.company_id.logo_url:
  72. <div>
  73. <img src="${object.worker_id.company_id.logo_url}">
  74. </div>
  75. %endif
  76. </div>
  77. ]]></field>
  78. </record>
  79. <record id="email_template_non_validated_sheet" model="mail.template">
  80. <field name="name">Non-validated sheet</field>
  81. <field name="subject">[${object.day}] Non-validated sheet ${object.time_slot}</field>
  82. <field name="model_id" ref="model_beesdoo_shift_sheet"/>
  83. <field name="auto_delete" eval="True"/>
  84. <field name="body_html"><![CDATA[
  85. <div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
  86. <p>${object.day}
  87. <br/><br/>The attendance sheet for ${object.time_slot} is not validated.
  88. <br/><br/>Please, do it as soon as possible so as to update workers' status.
  89. </p>
  90. </div>
  91. ]]></field>
  92. </record>
  93. <record id="email_template_shift_summary" model="mail.template">
  94. <field name="name">Shift Summary</field>
  95. <field name="subject">Your next shift (${format_tz(object.start_time,object.worker_id.tz or 'Europe/Brussels','%d.%m.%Y - %H:%M')})</field>
  96. <field name="email_from">${object.worker_id.company_id.email}</field>
  97. <field name="partner_to">${object.replaced_id.id or object.worker_id.id|safe}</field>
  98. <field name="model_id" ref="model_beesdoo_shift_shift"/>
  99. <field name="auto_delete" eval="True"/>
  100. <field name="lang">${object.worker_id.lang}</field>
  101. <field name="body_html"><![CDATA[
  102. <div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
  103. <p>Hello ${object.worker_id.name},</p>
  104. <p>You are awaited the ${format_tz(object.start_time,object.worker_id.tz or 'Europe/Brussels','%d.%m.%Y')}
  105. for the shift starting at ${format_tz(object.start_time,object.worker_id.tz or 'Europe/Brussels','%H:%M')}.
  106. <br/><br/>Please contact us at ${object.worker_id.company_id.email} if you have any trouble attending the shift.
  107. </p>
  108. <br/>
  109. <p>Sustainably yours,</p>
  110. <p>${object.worker_id.company_id.name}.</p>
  111. % if object.worker_id.company_id.street:
  112. ${object.worker_id.company_id.street}
  113. % endif
  114. % if object.worker_id.company_id.street2:
  115. ${object.worker_id.company_id.street2}<br/>
  116. % endif
  117. % if object.worker_id.company_id.city or object.worker_id.company_id.zip:
  118. ${object.worker_id.company_id.zip} ${object.worker_id.company_id.city}<br/>
  119. % endif
  120. % if object.worker_id.company_id.country_id:
  121. ${object.worker_id.company_id.state_id and ('%s, ' % object.worker_id.company_id.state_id.name) or ''} ${object.worker_id.company_id.country_id.name or ''}<br/>
  122. % endif
  123. % if object.worker_id.company_id.phone:
  124. Phone:&nbsp; ${object.worker_id.company_id.phone}
  125. % endif
  126. % if object.worker_id.company_id.website:
  127. <div>
  128. Web :&nbsp;<a href="${object.worker_id.company_id.website}">${object.worker_id.company_id.website}</a>
  129. </div>
  130. %endif
  131. % if object.worker_id.company_id.logo_url:
  132. <div>
  133. <img src=${object.worker_id.company_id.logo_url}>
  134. </div>
  135. %endif
  136. </div>
  137. ]]></field>
  138. </record>
  139. </data>
  140. </odoo>