Files
odoo_source/addons/website_event_questions/controllers/main.py
T
Jérome Maes ca8a47c352 [IMP] website_event, website_event_track, website_event_sale : prepare migration
- change method decorator (api.one -> api.multi) for `_set_show_menu`
and `_set_show_menu`
- rename controller class
2016-04-14 11:56:44 +02:00

18 lines
679 B
Python

# -*- coding: utf-8 -*-
from openerp.addons.website_event.controllers.main import WebsiteEventController
class website_event(WebsiteEventController):
def _process_registration_details(self, details):
''' Process data posted from the attendee details form. '''
registrations = super(website_event, self)._process_registration_details(details)
for registration in registrations:
answer_ids = []
for key, value in registration.iteritems():
if key.startswith('answer_ids-'):
answer_ids.append([4, int(value)])
registration['answer_ids'] = answer_ids
return registrations