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.

118 lines
6.3 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="beesdoo_shift.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. % endif
  20. % if not object.replaced_id:
  21. </p><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. % endif
  24. % if object.worker_id.working_mode == 'regular':
  25. % if object.state == 'absent_0':
  26. <br><br>Super-cooperator assigned you 0 compensation, so you won't have any additionnal shift to do before your next regular shift.
  27. % endif
  28. % if object.state == 'absent_1':
  29. <br><br>Super-cooperator assigned you 1 compensation, so you have to attend one additionnal shift before your next regular shift.
  30. % endif
  31. % if object.state == 'absent_2':
  32. <br><br>Super-cooperator assigned you 2 compensations, so you have to attend two additionnal shifts before your next regular shift.
  33. % endif
  34. % if object.replaced_id:
  35. You were supposed to replace ${object.worker_id.name}.
  36. 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>
  37. % else:
  38. 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>
  39. % endif
  40. % endif
  41. % if object.worker_id.working_mode == 'irregular':
  42. Your shift counter is at ${object.worker_id.cooperative_status_ids.sr}.
  43. % if object.worker_id.cooperative_status_ids.future_alert_date:
  44. It should be superior or equal to 1 before the
  45. ${object.worker_id.cooperative_status_ids.future_alert_date}.
  46. % endif
  47. <br>
  48. % endif
  49. % if object.replaced_id:
  50. Your current status is "${object.replaced_id.cooperative_status_ids.get_status_value()}".
  51. % else:
  52. <br><br>Your current status is "${object.worker_id.cooperative_status_ids.get_status_value()}".
  53. % endif
  54. <br>If you have any question regarding this non-attendance, just answer this e-mail.
  55. </p>
  56. <br>
  57. <p>Cooperatively yours,<br>
  58. The Members' office volunteers</p>
  59. <p>${object.worker_id.company_id.name}.</p>
  60. % if object.worker_id.company_id.street:
  61. ${object.worker_id.company_id.street}
  62. % endif
  63. % if object.worker_id.company_id.street2:
  64. ${object.worker_id.company_id.street2}<br>
  65. % endif
  66. % if object.worker_id.company_id.city or object.worker_id.company_id.zip:
  67. ${object.worker_id.company_id.zip} ${object.worker_id.company_id.city}<br>
  68. % endif
  69. % if object.worker_id.company_id.country_id:
  70. ${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>
  71. % endif
  72. % if object.worker_id.company_id.phone:
  73. Phone:&nbsp; ${object.worker_id.company_id.phone}
  74. % endif
  75. % if object.worker_id.company_id.website:
  76. <div>
  77. Web :&nbsp;<a href="${object.worker_id.company_id.website}">${object.worker_id.company_id.website}</a>
  78. </div>
  79. %endif
  80. % if object.worker_id.company_id.logo_url:
  81. <div>
  82. <img src="${object.worker_id.company_id.logo_url}">
  83. </div>
  84. %endif
  85. </div>
  86. ]]></field>
  87. </record>
  88. <record id="email_template_non_validated_sheet" model="mail.template">
  89. <field name="name">Non-validated sheet</field>
  90. <field name="subject">[${object.day}] Non-validated sheet ${object.time_slot}</field>
  91. <field name="model_id" ref="model_beesdoo_shift_sheet"/>
  92. <field name="auto_delete" eval="True"/>
  93. <field name="body_html"><![CDATA[
  94. <div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
  95. <p>${object.day}
  96. <br/><br/>The attendance sheet for ${object.time_slot} is not validated.
  97. <br/><br/>Please, do it as soon as possible so as to update workers' status.
  98. </p>
  99. </div>
  100. ]]></field>
  101. </record>
  102. </data>
  103. </odoo>