2018-01-16 06:58:15 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2018-01-16 11:34:37 +01:00
|
|
|
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
|
2018-01-16 06:58:15 +01:00
|
|
|
|
2018-01-16 11:34:37 +01:00
|
|
|
from flectra.addons.website_event.controllers.main import WebsiteEventController
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
class WebsiteEvent(WebsiteEventController):
|
|
|
|
|
|
|
|
def _process_registration_details(self, details):
|
|
|
|
''' Process data posted from the attendee details form. '''
|
|
|
|
registrations = super(WebsiteEvent, self)._process_registration_details(details)
|
|
|
|
for registration in registrations:
|
|
|
|
answer_ids = []
|
|
|
|
for key, value in registration.items():
|
|
|
|
if key.startswith('answer_ids-'):
|
|
|
|
answer_ids.append([4, int(value)])
|
|
|
|
registration['answer_ids'] = answer_ids
|
|
|
|
return registrations
|