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.

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