Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.
Add sudo for other operations on ir.actions.*
This commit adds necessary views and actions for users to be able to
conveniently analyze attendees answers.
- A graph view showing counts of each suggestions for simple_choice questions
- A pivot view showing registrations vs answers for simple_choice questions
- A tree view showing textual answers values for text_box questions
(Tree view is also available for simple_choice)
LINKS
PR #45497
Task 2189529
When applying an event.category on an event.event, we copy the event.questions
from the event.type, but we don't immediately copy the answers associated to
these questions.
This was not done for technical reasons, we were limited by the JS framework.
Since #46807
We now correctly handle nested o2m when triggering compute/onchange.
This commit cleans the code by correctly copying the answers along with the
questions when changing the event.type of an event.event.
LINKS
PR #45497
Task 2189529
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
PURPOSE
Questions asked to attendees are usually attendee specific according to
"statistics". It makes therefore sense to have a field activating the global
question mode that is False by default.
SPECIFICATIONS
Inverse behavior of boolean 'is_individual' and rename it to 'once_per_order'.
By default it is set to False, meaning all questions are individual.
LINKS
TaskID 2162438
Community PR odoo/odoo#44476
Upgrade PR odoo/upgrade#771
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
PURPOSE
As event will soon evolve (onchange -> compute, code improvements, addition of
new features) cleaning and improving tests is necessary to help avoid issues.
SPECIFICATIONS
As event model grow in complexity and features, it is easier to find its
way through the application with having registration model lying in its
own file to separate it from event-specific models (event.type, event.event).
Ticket (event_sale) and sponsor (website_event_track) models are also extracted
in their own file.
LINKS
LINKS
Side effect of Task ID 2089156 (event onchange to compute)
Community PR odoo/odoo#43127
Enterprise PR odoo/enterprise#7656