diff --git a/beesdoo_shift/data/mail_template.xml b/beesdoo_shift/data/mail_template.xml index 265bb55..ae6cc2a 100644 --- a/beesdoo_shift/data/mail_template.xml +++ b/beesdoo_shift/data/mail_template.xml @@ -2,7 +2,8 @@ - + + Shift Non-attendance Non-attendance to your last shift. @@ -13,36 +14,39 @@ - % if object.replaced_id: -

Hello ${object.replaced_id.name}, - -

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')}), - and you were supposed to replace ${object.worker_id.name}. -

Your current status is "${object.worker_id.cooperative_status_ids.get_status_value()}". - % endif +

Hello ${object.replaced_id.name or object.worker_id.name}, - % if not object.replaced_id: -

Hello ${object.worker_id.name},

- -

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')}). -

Your current status is "${object.worker_id.cooperative_status_ids.get_status_value()}". - % endif +

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')}). % if object.worker_id.working_mode == 'regular': % if object.state == 'absent_0': -

Super-cooperator assigned you 0 compensation, so you won't have any additionnal shift to do before your next regular shift. +

The supercooperator assigned you 0 compensation shift. % endif % if object.state == 'absent_1': -

Super-cooperator assigned you 1 compensation, so you have to attend one additionnal shift before your next regular shift. +

The supercooperator assigned you 1 compensation shift. % endif % if object.state == 'absent_2': -

Super-cooperator assigned you 2 compensations, so you have to attend two additionnal shifts before your next regular shift. +

The supercooperator assigned you 2 compensation shifts. % endif + + % if object.replaced_id: + 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.
+ % else: + 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.
+ % endif % endif % if object.worker_id.working_mode == 'irregular': - Your shift counter is ${object.worker_id.cooperative_status_ids.sr}. - You should be at a minimum of 0 before the ${object.worker_id.cooperative_status_ids.future_alert_date}. + Your shift counter is at ${object.worker_id.cooperative_status_ids.sr} and should + be superior or equal to 1 before the + ${object.worker_id.cooperative_status_ids.future_alert_date}.
+ % endif + + % if object.replaced_id: + You were supposed to replace ${object.worker_id.name} and your + current status is "${object.replaced_id.cooperative_status_ids.get_status_value()}". + % else: +

Your current status is "${object.worker_id.cooperative_status_ids.get_status_value()}". % endif
If you have any question regarding this non-attendance, just answer this e-mail.