Browse Source

[FIX] website_shift: Holiday shown after end of it

Before:
    The holiday is shown even if the holiday is in the past.
After:
    The holiday is shown only if the holiday is now or in the future.
pull/33/head
Rémy Taymans 6 years ago
parent
commit
0cff5a0808
  1. 8
      beesdoo_website_shift/views/my_shift_website_templates.xml

8
beesdoo_website_shift/views/my_shift_website_templates.xml

@ -84,13 +84,13 @@
<t t-esc="dict(status.fields_get(allfields=['status'])['status']['selection'])[status.status]"/>
</p>
<p t-if="status.holiday_start_time">
<label>Holiday start time:</label>
<p t-if="status.holiday_start_time and status.holiday_start_time > status.today or status.status == 'holiday'">
<label>Begin of Holiday:</label>
<t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.holiday_start_time, '%Y-%m-%d'))"/>
</p>
<p t-if="status.holiday_end_time">
<label>Holiday end time:</label>
<p t-if="status.holiday_end_time and status.holiday_end_time > status.today or status.status == 'holiday'">
<label>End of Holiday:</label>
<t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.holiday_end_time, '%Y-%m-%d'))"/>
</p>

Loading…
Cancel
Save