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.

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