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.

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