Problem ------- Since https://github.com/odoo/odoo/commit/d3b18979bfb5496fa4370fdf03a806c469127730, when a visitor register for an event, the fields in the POST are checked against a list of allowed fields. The list is hardcoded inside the method _process_attendees_form. Solution -------- Move this list in a specific method that can be easily overidden by another module closes odoo/odoo#67080 X-original-commit: ebadf16c7c38ca52ec4c5ce871c2584aaa98b91d Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Signed-off-by: Thibault Francois <tfr-odoo@users.noreply.github.com>
15 lines
490 B
Python
15 lines
490 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class EventRegistration(models.Model):
|
|
_name = 'event.registration'
|
|
_inherit = ['event.registration']
|
|
|
|
visitor_id = fields.Many2one('website.visitor', string='Visitor', ondelete='set null')
|
|
|
|
def _get_website_registration_allowed_fields(self):
|
|
return {'name', 'phone', 'email', 'mobile', 'event_id', 'partner_id', 'event_ticket_id'}
|