summaryrefslogtreecommitdiff
path: root/addons/website_event/controllers/main.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-04-01 14:20:07 +0000
committerThibault Delavallée <tde@odoo.com>2020-04-03 11:07:56 +0000
commitbc1b5e134bee183072507fd86c044403b502e22b (patch)
tree67bd8ddbfc3d1a2768a62570131c62e5db741608 /addons/website_event/controllers/main.py
parentb29b4bcbfc61aab1035de1f8b0cb9c796cd4bc58 (diff)
[FIX] website_event: better sold out computation
Purpose of this commit is to remove some complex check embedded in templates and replace them by a computed unstored field. It eases definition and understanding. Its computation has been cleaned, so that sold out appears only when tickets are really sold out, not if their end sales date is reached. Sold out label is displayed in both event list and event specific page views in frontend. Small spacing issues in frontend registration form are also fixed. Task ID 2228189 Community PR odoo/odoo#48652 X-original-commit: c36cf90e7b83d2424b2f52ad8a2fec0bf367e8d8
Diffstat (limited to 'addons/website_event/controllers/main.py')
-rw-r--r--addons/website_event/controllers/main.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/addons/website_event/controllers/main.py b/addons/website_event/controllers/main.py
index ea484cab7a8..4c23c3165dc 100644
--- a/addons/website_event/controllers/main.py
+++ b/addons/website_event/controllers/main.py
@@ -208,7 +208,6 @@ class WebsiteEventController(http.Controller):
urls = event._get_event_resource_urls()
values = {
'event': event,
- 'sold_out': all(not ticket.sale_available and not ticket.is_expired for ticket in event.event_ticket_ids),
'main_object': event,
'range': range,
'google_url': urls.get('google_url'),