Wednesday, March 30, 2022
1 change · master
Enhancements to existing features
Appointment managers can now see and analyze how attendees answer booking questions, including choice breakdowns and text responses. The setup screens are also clearer, with easier answer editing, ordering, and validation to prevent incomplete choice questions.
Original PR description
PURPOSE This commit adds reporting for answers of questions on appointment types. It also makes the display of these answers cleaner and more efficient on their form. CHANGES The last three changes…
PURPOSE This commit adds reporting for answers of questions on appointment types. It also makes the display of these answers cleaner and more efficient on their form. CHANGES The last three changes mainly concern selectable-answers questions: select, radio, checkbox. 1. Add placeholders to avoid blank fields on the calendar appointment question form, and give insight of different fields. 2. Use o2m instead of m2m for answer_ids Before, the answers were a many2many field on calendar.appointment.question model. However, it did not make much sense to have all existing answers available to choose from. After this commit, the field answer_ids is set as a one2many instead, only containing meaningful answers. The use of a o2m is therefore natural. An exception is raised if no answer is set when using a selection mode (select / radio / checkbox) 3. Better display in back-end The many2many tags in question form is replaced with a editable tree view which makes it simpler to edit, see and remove answers. A field sequence is added to answers in order for them to be sorted with handle widget. In the appointment_type form, the embedded question tree view now displays available answers (in order) with a many2many tags widget. The user do not have to click on it and open the menu to see what available answers there are. 4. Add reporting for answer breakdown In order for the appointment manager to see what the participants answer, this commit adds reporting features for each question, directly accessible via the bar chart icon on the question tree view in appointment type form. - select/radio/checkbox question_type: pivot/graph/tree - char/text question_type: tree To do so, a new model calendar.appointment.answer.input is added, and answers are now added in database. Before, they were only stored as a formatted text: the description of the calendar_event created for the appointment. - select/radio : store id of selected answer - checkbox : create one record per selected answer and store it - text/char : store the text answer --- Links --- Task Id - 2621327 Ent PR - odoo/enterprise#20433 UPG PR - odoo/upgrade#2984