diff options
| author | Thibault Delavallée <tde@odoo.com> | 2020-05-19 07:50:10 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-05-19 10:14:41 +0000 |
| commit | 5a5eced13cbffd62f2699f46c0e80b868a3bf79c (patch) | |
| tree | f7f2d494556e45f58c99fea262cf2f64339284a7 /addons/website_event | |
| parent | 80197388429f39ed57a5ce95d49281026a335488 (diff) | |
[FIX] website_event: do not tell yet-to-come events are closed
Currently if an event has tickets, some of them with start date and some of
them without, it is considered has beginning at the minimal start date.
However if a ticket has no start date and is not expired, it means it is
available for sale.
An event start date is therefore the first date of its not expired tickets if
they all have a date, otherwise it is set to False (aka, already started).
We also fix display in main event page: events not yet open are not considered
as Sold out or Closed anymore, just not yet open.
Task ID 2244487
PR #51503
closes odoo/odoo#51523
X-original-commit: 8404a6ff12ee82e9b4ec35660f74dbe0b4a90cb0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/website_event')
| -rw-r--r-- | addons/website_event/views/event_templates.xml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/website_event/views/event_templates.xml b/addons/website_event/views/event_templates.xml index 551ce3e4fb0..7a11d08bdcd 100644 --- a/addons/website_event/views/event_templates.xml +++ b/addons/website_event/views/event_templates.xml @@ -235,10 +235,12 @@ </main> </div> <!-- Footer --> - <footer - t-attf-class="small align-self-end w-100 #{opt_events_list_cards and 'card-footer' or ((not opt_events_list_columns) and 'border-top mx-4 mt-auto pt-2' or 'border-top py-2')}"> + <footer t-attf-class="small align-self-end w-100 #{opt_events_list_cards and 'card-footer' or ((not opt_events_list_columns) and 'border-top mx-4 mt-auto pt-2' or 'border-top py-2')}"> <span t-if="not event.event_registrations_open" class="text-danger"> - <t t-if="event.event_registrations_sold_out"> + <t t-if="event.start_sale_date and event.start_sale_date > datetime.date.today()"> + Registrations not yet open + </t> + <t t-elif="event.event_registrations_sold_out"> Sold Out </t> <t t-else=""> |
