summaryrefslogtreecommitdiff
path: root/addons/website_event/controllers
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-04-01 12:36:17 +0000
committerThibault Delavallée <tde@odoo.com>2020-04-03 11:07:56 +0000
commitb29b4bcbfc61aab1035de1f8b0cb9c796cd4bc58 (patch)
tree29b7897051ec4e24d81610e616292730bbca9389 /addons/website_event/controllers
parentd2840a0519725c8d55cafe9e2b91ebbfe515c804 (diff)
[FIX] event: ensure event_registrations_open can always be computed
Using a compute_sudo ensure this field is correctly computed (aka without crash) if someone is allowed to read the event but not all its sub models. For example event_registrations_open reads the active flag of a product linked to a ticker which may not be readable by public users. This field is used in frontend templates and therefore usable by external people. Also remove unnecessary registrable rendering parameter in website_event as it has been replaced by computed fields. Task ID 2228189 Community PR odoo/odoo#48652 X-original-commit: b2b334a65f3a1379f25717ec39f0a52f3305b19c
Diffstat (limited to 'addons/website_event/controllers')
-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 11e17a4f7a4..ea484cab7a8 100644
--- a/addons/website_event/controllers/main.py
+++ b/addons/website_event/controllers/main.py
@@ -211,7 +211,6 @@ class WebsiteEventController(http.Controller):
'sold_out': all(not ticket.sale_available and not ticket.is_expired for ticket in event.event_ticket_ids),
'main_object': event,
'range': range,
- 'registrable': event.sudo().event_registrations_open,
'google_url': urls.get('google_url'),
'iCal_url': urls.get('iCal_url'),
}