Purpose
=======
Improve the overall look of the page for screen and print media.
Display/hide questions, and alternate between pagination and full
display of user responses.
Specifications
==============
= HEADER AND OVERVIEW =
- remove waste space between Edit Survey button and survey title
- remove trophy cup or any icon on the right of the title
- put filters on the right of the title
- remove background
- replace the `Results overview pie chart` by the survey KPI's
- add a print button
= QUESTIONS =
- add a button for each question to toggle their visibility
- avoid breaking question into multiple lines, use all space available
- change info badges design so they are not mistaken for buttons
- remove question type from the info badges
= USER RESPONSES =
- add a `show all` button per question to display all responses,
whitout pager and scrollbar.
- for each response, push the filter icon to right side of the row
- use regular font and color for responses, remove response text from
the anchor tag
= PRINT MODE =
- hide the `webeditor/ back to backend` button
- visible questions: display all responses (no pagination or scrollbar)
- user responses: hide filter icons
- make sure elements like tables are properly cut between pages
- resize graphs to ensure they fit into A4 paper page
task-3424235
closesodoo/odoo#135683
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, in the survey for single/multiple choice questions, the layout is
not consistent. For example, if there are four choices available, the
layout is 3-1 (3 small options in the first row, 1 full-width option in the last
row). Apart from that, if the string for options is long, the radio/check
box comes at the bottom right corner, which should always be at the
top right corner.
This commit does the following improvements:
1/ Improve the choices layout to make it beautiful. now there will be only one
answer per row similar to the 'One Page Per Question' layout.
2/ The radio / check-box icon will be displayed in the top right corner
regardless of the length of the option strings.
3/ If there is one or more image(s) in the answers then we will follow 2x2
layout instead of one row per answer.
TaskID-2712296
closesodoo/odoo#99229
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
This commit allows the user to navigate freely through a
survey with mandatory questions. He will be able to skip
questions and come back to them later. If he still hasn't
answered them at the final submit they will automatically
be displayed with an error message to invite the user to
answer them. The user can navigate through the skipped
questions with a button within the error box.
Task-2605657
closesodoo/odoo#119315
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
We here fix the `SurveyQuestionAnswer._compute_display_name`
method introduced in 55fa52be.
`survey.question.answers` used as matrix rows and columns
require different treatment as they are not used in triggers
but are both shown on the `survey.user.input.line` views,
where the display shouldn't change (nor cause a crash).
It also doesn't make much sense to create answers outside the
context of a question, so we remove the button that already
wasn't shown on the tree view.
As users may not fully upgrade their views or may wish to customize,
we add a fallback question title in `_compute_display_name`too.
Task-3495142
closesodoo/odoo#135853
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Vivek Pathak <vivp@odoo.com>
Before this commit, it was possible to have users fill-in
a scored survey with no way possible to pass it because no
answer had any positive score obtainable.
We keep here the check on sharing of the survey to avoid
errors while configuring the survey, the same way it is
already done when trying to share a survey without any
question at all.
Note that we are also adding this warning and the "This is a
test survey" notice for survey_user and not only managers
because users can also test their surveys...
Task-3374592
closesodoo/odoo#130553
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Purpose
=======
Make it easy for users to differenciate bewteen
simple choice and multiple choice question types.
Specification
=============
Change the multiple choice question type checkboxes
icon from a circle to a square in the survey result page
and the survey template.
In the question form view, tick 2 checkboxes instead of
one for the multiple choice question type.
Task-3252870
closesodoo/odoo#129882
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
As tempusdominus relies on jQuery, we have written our own date(time)
picker in owl. This commit converts the remaining uses of the
tempusdominus date(time) picker and replaces them by our own.
closesodoo/odoo#133349
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Purpose: allowing users to select multiple answers, even from
different questions, as triggers to display a subsequent question.
For example, we could ask the question
"What qualities do you look for in a desk?"
if the participant selected one of the following answers before:
"What furniture did you already buy from us?" - "A desk"
"What kind of furniture are you looking for?" - "Office furniture"
Demo data and tests are adapted and new ones are added.
We also take this opportunity to remove `is_conditional` because:
1. This field isn't useful anymore.
2. It could cause inconsistencies as it is not supported to check
with a sql constraint that `suggested_answer_ids` is set when this
flag is `True`.
Task-2937533
Part-of: odoo/odoo#109903
Co-authored-by: Pratik Raval <prra@odoo.com>
Some buttons were stuck together or some had too much of a gap between
them, this commit aims to harmonize the space between buttons.
task-3378519
part of task-3326263
X-original-commit: 68d16f5b2131f44b2dfc3a5d6756aea8987b3fd5
Part-of: odoo/odoo#127613
* Remove close button from the edit banner when
testing a survey so that users can't hide it anymore.
* Reduce height of the banner to align with the
website Home/Go-to-backend button.
* Open Test survey in a new tab
Task-3374928
closesodoo/odoo#127219
X-original-commit: e312a956af52fcd0627c8d169fc86bee035e2dea
Related: odoo/enterprise#43590
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Amélie Dieudonné (amdi) <amdi@odoo.com>
before this commit,
once users got an invitation to fill out any survey and if they log in with
another credential than the shared credentials, they will be redirected to the
home page instead of a survey.
after this commit,
if the user tries to fill out the survey with another credential, an error
will be raised that the user doesn't have access
Task-2960271
closesodoo/odoo#102612
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
fix-up of https://github.com/odoo/odoo/commit/a0a78f807abd15cb64994aa626a48a0589e16570
Currently, When a user selects 'Live Survey' as the survey type, the
`is_attemps_limited` field is visible although it should be hidden.
This commit fixes this issue by hiding the field when the survey type
is set to 'Live survey'.
Along with that, this commit also removes the condition that hides the
`is_attemps_limited` field when there is/are conditional question(s) in the
survey.
TaskID-3326930
closesodoo/odoo#123596
X-original-commit: d5d0b97b9ada57f43b026da758a0f0044519f460
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.
task-3326633
Part of task-3326263
X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.
task-2818586
Part-of: odoo/odoo#116641
This commit fixes the ribbons used in `kanban` and `form` views.
The SCSS uses the square root of the parent `div.ribbon` to calculate its
diagonal width and applies that width to the child `span`.
After changing the ribbon's transform-origin, we calculate the ribbon's
position based on CSS variables of the view's top padding,the height of
the ribbon and the shadow's size (to avoid it being cropped by
overflow-hidden).
By changing the values of a few of these variables in the kanban view,
we were able to remove all the specific SCSS related to ribbons in the
modules.
Other changes were applied inside some of the modules to make this
work:
- `event`: padding corrections on the kanban's cards;
- `hr_holidays: replaced `margin:0` in the SCSS with negative margin
utility classes on the element to achieve the same visual result;
- `discuss`: moved the ribbon to the parent element;
- this was also done to `discuss`, `survey` and `helpdesk`;
- `crm_team_view` in `sales_team`: the ribbon's height made it overflow
from the kanban's card. We fixed this by changing the value of one of
the CSS variables in the view's SCSS file;
- the same thing was done in `survey` and `appointment`;
- `website_event_exhibitor` had some SCSS that wasn't being used because
it uses `.o_ribbon` instead of `.ribbon`
task-2818586
Part-of: odoo/odoo#116641
*: hr_holidays, stock, sale, product, web, sale, purchase, stock,
website, survey
Adapt some custom control panels (mainly for custom reports) to the
milk controlpanel.
hr_holidays:
Move the buttons to create a new time off or a new allocation to the
"create button" slot and transform it into a dropdown (creating
allocation requests is clearly a secondary action, not a primary one)
stock:
3 lines does not fit, must be on 2 lines
Part-of: odoo/odoo#116641
The above two fields, which we are cleaning up, were added to fix the
resequencing issue https://github.com/odoo/odoo/pull/108450.
The other problem that remains here is that whenever we are opening the multiple
choice question from the (survey.survey) form view after changing the question
selection field, we get traceback.
The problem was generic, so a more generic fix was pushed into the JS framework
https://github.com/odoo/odoo/pull/116561 ,which solves the earlier resequencing issue. So here we are cleaning up
the earlier fix, which is unnecessary now. And by this issue while opening multiple
choice question also resolves.
Task-3127646
closesodoo/odoo#120618
X-original-commit: c65c15eaab4b6e62e671c00a25d2aef2287d4387
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
In order to ease the creation of survey, we simplify the option form in survey
by adding a new field survey_type in survey_survey. Thanks to it, we only
display relevant options in the form depending on the survey type chosen.
We also adapt the "no content helper" which help the user to create his first
survey with an example for each survey type (mostly a renaming).
Technical note: in hr_appraisal, the added survey type is used instead of the
field is_appraisal, which is removed as we don't need it anymore. The value of
the field is_appraisal is used during the upgrade to set the survey type to
appraisal when that field is true.
When changing the survey_type, some fields are updated to guide the users. For
some fields, we also set them in readonly. But in that case, the updated value
is not saved. That's why we have added the force_save="1" attribute for those
field in the form.
Task-3061869
closesodoo/odoo#115297
Related: odoo/enterprise#38268
Related: odoo/upgrade#4464
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit adds two autoresize hooks for text inputs and textareas to
make it adapt their size (width for text inputs, height for textareas)
depending on their content.
The commit therefore solves the issue of several form view task titles
being restricted to 1 line while it can be annoying if the title is too
long. The autoresizeTextarea feature was moved from TextField to the
autoresizeTextarea hook and the autoresizeInput feature was moved from
the AutoresizeInput mail component to the autoresizeInput hook.
The TextField component has a new option for disabling linebreaks.
task-3138826
closesodoo/odoo#117355
Related: odoo/enterprise#39493
Signed-off-by: Géry Debongnie <ged@odoo.com>
The goal of this commit is to make certification reports editable by
studio. We also move certification reports into separate report folder
from views, and merge modern and classic views into one. This way we avoid
duplicated code and at the same time the structure will make more sense since
it is already working as a single template.
Task-3148819
closesodoo/odoo#113469
Related: odoo/upgrade#4503
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Currently in the survey:
- If we have a conditional question and the question selection mode is
random and we select the question layout as one page with all questions
or one page per section, the conditional question is not visible. This
happens because the random mode condition is ignored.
- If we have a conditional question and the question selection mode is random
and we select the question layout as one page per section, the traceback is
generated when we start the survey. This is because it is trying to get value
from the "selected_answer", which does not exist in random mode.
Expected behaviour is If the question selection mode is random, the conditional
questions are considered normal and visible and do not generate a trace back if
the question layout is one page per section.
This commit fixes the above issue by adding a condition that treats
the conditional question as a normal question when the question
selection mode is random.
task-3142209
closesodoo/odoo#117048
X-original-commit: 73552632b4397ebad1149c6e394ce4ff6d0f0d1e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
While presenting a survey, sometimes it is good to know what content
will be next. However, this is not possible currently.
This commit improves the behavior to display a tooltip msg on the right
arrow so that the presenter/speaker knows what is next.
Task-2791000
closesodoo/odoo#97713
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit moves the graph data the user got at the end
of the survey to the review answers section.
Task-2991360
closesodoo/odoo#114130
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
When having long choices in the question form, prevent
the "Upload your file" button from being cropped by applying
a fixed width to the image column.
Task-3215473
closesodoo/odoo#115481
X-original-commit: eb0f2b27cf9c8af1c5c77f0736e430b793e54b2d
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
In some cases name and email are NULL in survey.user_input so it's
return False and can't change the case of the boolean value.
So here add the blank string if name and email is not set.
sentry-3951409506
closesodoo/odoo#115455
X-original-commit: 68b5ab4f2936a02fe8245b887bf402abd4fd2997
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
**Before this commit**
- The optional "class" attribute set on the root node of a view arch
is ignored, except for the kanban view which has a custom
way of using it.
- The optional "js_class" attribute set on the root node of a view arch
does not have any impact on the class names passed to its controller.
**After this commit**
The content of the optional attribute "class" set on the root node of an
arch like in
<list class="o_custom_class">
...
</list>
as well as an additionnal class derived [1] from the value of the
"js_class" attribute set on the root node of an arch like in
<list js_class="extended_list">
...
</list>
will both be found in the prop "className" of any view controller.
[1] a js_class value of "xyz" yields to the class "o_xyz_view"
**Note on this commit**
The kanban view was already appending the root node class attribute
to its renderer element. This is no longer the case and some styling
rules has been adapted.
closesodoo/odoo#113014
Related: odoo/enterprise#37265
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Purpose
=======
Improve the results page filter to allow the filtering
on questions of type text_box, char_box, numerical_box,
date and datetime.
Specifications
==============
Updating the URL filters representation to avoid passing the
question types directly in the URL parameters.
Answer matching per question type:
- char_box, text_box: 'ilike'
- numerical_box, date, datetime: '='
Adding a new filter restricts the current filter results.
Handling the filters depending on the 2 different answer models:
'survey.question.answer': matrix, simple_choice, multiple_choice
'survey.user_input.line': char_box, text_box, numerical_box, date,
datetime.
The filters can be combined but their query count doesn't add up
if their related answers data are stored in the same model.
Task-3138245
closesodoo/odoo#110252
Related: odoo/enterprise#36383
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
After this commit, the user will be able to clone a question
inside a survey, the cloned question will have the same sequence
as the original and thus will be displayed just below it.
This commit also remove the is_conditional icon on the overall
questions tree view and the misplaced warning which was
previously introduced in commit [1].
[1] : b1d1856245
Task-3088848
closesodoo/odoo#112385
X-original-commit: bdcc2e6c4bec23c200a3fa2a2b4dd1bb06943f39
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Prevent table with answers from flickering when
having multiple pages with different items count.
Specifications
==============
Adjust the table height to the question types to
keep the pagination buttons on the same level while
switching pages.
Each table line is expected to be, for the text_box
questions, 3 lines height and for the char_box,
numerical, date and datetime question types
(+ comments), only one line height.
Adding a scrollbar if the table height is greater
than expected.
For the text, char, number, date and datetime
question type (+ comments), set the input line id
cells width to a percentage to avoid horizontal
flicker while changing pages and to reduce first
column width.
Task-2957775
Part-of: odoo/odoo#100168
Display a no answers helper instead of the empty table
and the alert message when a question doesn't have
any answers.
Task-2957775
Part-of: odoo/odoo#100168
With this commit we add images to the answers in result page.
when clicking on the image, we open a survey_image_zoomer widget.
We also add "Responsible" filter on survey.survey view
task-3092439
closesodoo/odoo#108430
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Purpose
=======
Make sure we display a correct progress number.
Specs
=====
When configuring a survey as one page per question and the random selection
of the questions, the numbers near the progress bar where not correct.
With this commit they now are.
task-2988062
closesodoo/odoo#109802
X-original-commit: 9487495e5e9a3f6ce899249f7eab6c7074c64464
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
## Survey
Due to the behavior of X2Many fields, the questions created when editing
a survey were not usable immediately after creation to be conditional
triggers for new questions. The whole survey had to be saved first, which
wasn't a smooth experience for the user.
This commit will save the survey and question at several times:
### For each new question added
Similarly to what was implemented for chatbot scripts, enables the
immediate computation of allowed question/answer triggers, permitting their
use when chaining question creation.
This also enables to check the answers "validation" fields immediately, and
activating scoring and add scores to question/answers without requiring the
extra steps of saving and re-entering edit mode for the survey.
### When rows are deleted
This will trigger the immediate removal of the triggers icons on
questions that were triggered by an answer to the deleted question.
### NOT when questions are moved
As there is no convenient way to ensure questions are properly ordered with
respect to their triggers (order dependency) without popping error messages
at every step when reordering questions, we chose to mark the misplaced lines,
missing trigger records or triggers that will be ignored (with the new
`trigger` widget).
This could have been done entirely with 'server' logic, but that would have
required additional saves and cleaning fields even more often, even during a
temporary reordering step, which isn't convenient.
### Misc
Finally, note the extra fields added on the question_and_page_ids field of the
survey form view, required to trigger these fields' update consistently
(required after reordering or removing records which sometimes doesn't occur
without these).
Tests ensuring the behavior of the X2Many (saving parent on open/edit and show
notifications on error) and the trigger widget are included.
## web
To support the functionality described above, we need to allow the caller of
'save' to catch errors to prevent default handling (here to use a notification
instead of an additional Dialog).
Task-2623482
Part of odoo#78705
Part-of: odoo/odoo#78705
Purpose: Showing validation parameters with an arrow on one line (when
possible) is prettier.
Additionally, we now
- Improve data consistency by preventing saving `validation_required` without
setting validation parameters (also allows to keep arrow invisible when no
value is set)
- Explicitly add required flags to float values as they cannot be not set (see
c5ae9b38).
Task-2623482
Part of odoo#78705
Part-of: odoo/odoo#78705
This commit separate the templates, one for the card and another one for
the menu (the ellipsis dropdown).
The new template, called 'kanban-menu', will only contain the dropdown.
Note that, this behaviour is the same as the one used for the kanban
tooltips.
closesodoo/odoo#107589
Task-id: 3096776
Related: odoo/documentation#3284
Related: odoo/enterprise#34962
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit disables the submit button on the survey main form during loading.
This is done to avoid the user clicking on the submit button *before* the
JavaScript code is loaded, which will by default trigger a page reload.
That situation can happen on slow connections, and as it reloads the page, the
user keeps clicking on "start" and it keeps reloading, creating frustration.
Task-3111551
closesodoo/odoo#108802
X-original-commit: cb12745329177812bd48ac5520044069ed6ecb9e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Moving an answer of a multiple choice was triggering a traceback. This solves
the problem.
Technical note: the method _applyX2ManyChange which try to apply commands on
local data was trying to read field information for suggested_answer_ids on the
list view but that view was lacking that field. Adding that field as invisible
on that view solves the problem.
Same thing applies for "matrix_row_ids" for matrix questions.
Task-3106406
closesodoo/odoo#108775
X-original-commit: f08a19894c7e4515566e9744bab69d6e03174d8c
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
The field that adds an option in the MCQ was wrongly removed from the views in
v15.3 in Task-2600241.
This commit fixes it by adding it back with the label 'Comment is an answer'.
taskID-3074257
closesodoo/odoo#107285
X-original-commit: 3de1e63d9411f88b397ad83109021574b1036b6e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Allow users to search by live session code without
taking extra space in the UI. The live session code
search is hidden under the Survey name search.
Task-3067507
closesodoo/odoo#105847
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prevent the kanban view progress bar
from overlapping the courses count.
Task-3069581
closesodoo/odoo#106170
X-original-commit: 9eca4d4a6df7d14cbe6cc268a393caa663dcf68e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Fix the matrix question type preview display
on small and medium screen size.
Task-3006768
closesodoo/odoo#103294
X-original-commit: 8b008e01bc2c5effe3542ec30ccfe31dbae6840e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, the fields associated to the badge on the survey form are not
visible following the changes with the "always edit" feature.
This commit simply adds a placeholder on the badge field to let the end user
know that there is something to fill in.
We also used that opportunity to sneak in a few additional placeholders.
Task-3028991
closesodoo/odoo#104182
X-original-commit: 2df6ce4708554d3dad59a9b9b15f03057c204c43
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Since the usage of the `CSS Grid` some view are broken.
The new form view system is less tolerant to missing colspan.
This commit, change the colspan when needed (e.g. no label) and in some
case extract the label outside the `DIV` to use `GRID` layout.
Steps to reproduce:
* Go to survey
* Select a survey
* Select the Option notebook, fields are not aligned => BUG
* OR
* Click on Add a question
* list view in Answers notebook are not aligned => BUG
closesodoo/odoo#102319
X-original-commit: 51c1f6ed300e3dd185c45e14dff1ee9250f6e562
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Purpose
=======
Keep iterating on the UI & Onboarding of Survey as we plan to massively
distribute it with the new Saas formula (installed by default).
Specs
=======
* Changed the look and feel of the Action Helper inside the Surveys
* Changed the Default Feedback Form: end message modified and two layers
removed
task-2901947
closesodoo/odoo#101507
X-original-commit: 6280f160d77e3c1777516fbfd2e225e13642872b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>