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.

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