PURPOSE Allow "free text" questions in the event questions asked to attendees, in addition to the existing "selection" type. e.g: "What are your allergies?" SPECS The implementation is heavily based on the modelisation we chose for the survey module since the features become similar in terms of question types and inputs. - Introduce a 'question_type' that is either 'simple_choice' (= previous behavior) or 'text_box' that will contain the attendee text answer. - Rename the event.answer model to event.question.answer to make it more obvious that it contains answer "suggestions" to a question of type 'simple_choice'. - Introduce a 'event.user_input.line' that is an answer to a specific question for a specific registration. It works very similarly to 'survey.user_input.line' but it's not contained in a 'user_input' model, it's directly linked to the registration using a 'user_input_line_ids' o2m field. The frontend view has been adapted accordingly to display either a selection input or a textarea based on the question type. The frontend orm processing now takes in both answer types (id of suggested answer or text input). On the backend side, views have been adapted to display event questions and attendee answers in a more convenient and logical manner. LINKS PR #45497 Upgrade PR odoo/upgrade#799 Task ID 2189529
600 B
600 B
| 1 | id | name | model_id:id | group_id:id | perm_read | perm_write | perm_create | perm_unlink |
|---|---|---|---|---|---|---|---|---|
| 2 | event_question_all | event.question.all | model_event_question | 1 | 0 | 0 | 0 | |
| 3 | event_question_event_user | event.question.event.user | model_event_question | event.group_event_user | 1 | 1 | 1 | 1 |
| 4 | event_question_answer_all | event.question.answer.all | model_event_question_answer | 1 | 0 | 0 | 0 | |
| 5 | event_question_answer_event_user | event.question.answer.event.user | model_event_question_answer | event.group_event_user | 1 | 1 | 1 | 1 |
| 6 | event_registration_answer_event_user | event.registration.answer.event.user | model_event_registration_answer | event.group_event_user | 1 | 1 | 1 | 1 |