*: bus, calendar, hr_attendance, iap_mail, im_livechat, project, snailmail,
snailmail_account, survey, web, web_editor, website_livechat.
This commit is part of the websocket integration in Odoo.
This bus service now communicates with a shared worker in order to provide
a single websocket connection for multiple tabs. It is designed to
be used as a websocket except that events are slightly different,
re-connection is handled automatically. If the browser does not support shared
worker (Safari), the service fallback on a simple web worker.
Available events are:
- connect : fired upon a successful connection.
- disconnect : fired upon reception of the websocket close event.
The close code and reason are given to the listeners callback.
- reconnect : fired upon a successful re-connection.
- reconnecting : triggered when the worker starts to try reconnecting.
- notification : fired upon the reception of notifications.
Since multiple tabs are now handled by a worker, the cross_tab bus is no longer
required and has been removed.
Part-of: odoo/odoo#75510
The attribute aria-labelledby was used erroneously and was misspelled.
This commit corrects that by replacing it with the aria-label attribute.
task-2937538
closesodoo/odoo#98401
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
PURPOSE:
This commit adds a tour that is started when the survey module is
installed, and makes small changes to be able to implement the tour.
SPECS
-Implementation of the tour:
The tour suggests to the user to try and test a sample survey, and shows how
to check the results gathered for this survey.
-Changed the target of the "test" button to "self":
Since the test action is used during the tour, the test page needs to be opened
in the same tab so that the tour can continue.
Task-2794884
Part-of: odoo/odoo#87326
PURPOSE:
This commit improves the accessibility of the survey samples when no records
are shown.
SPECS
Remove the modal used to show the samples and show them on the empty screen
instead.
When no survey exists, the user gets the proposition of trying survey samples.
Previously, the user had to click on a button to open a modal showing the
different samples. Now, the samples are shown in the empty screen directly.
If the user does not have the rights to create surveys, the "Try It" buttons
are removed from the NoContentHelper.
Task-2794884
Part-of: odoo/odoo#87326
Before this commit, images displayed on survey question answers
were small and hard to read, and nothing existed in order to zoom
on them properly.
AFTER THIS COMMIT
Backend:
A new field value_image_filename is added to store the names of
the image fields. They are seen when editing an answer (line).
The max_height and max_width of the images are raised to 1024 px
on their field definition in survey.question.answer to compromise
between image resolution and space, and in order to be able to
zoom on them and still see details
Survey:
A hovering frame is visible on the images, as well as a zoom in
cursor, to indicate we can click on them to zoom in. The rest of
the answer frame is the selection area. Clicking anywhere on the
modal closes it. Until then, a pointer cursor hints the feature.
A new widget SurveyImageZoomer is added. Once the user has clicked
on a choice image, a transparent modal is opened on the whole screen.
This is thought for all size devices : it can be closed by clicking
anywhere, or the cross button, or ESC key. It will always be destroyed.
Also, for small width screens, we do not take the whole height but leave
bands over and below to indicate the mobile users can leave by clicking out.
The image will be displayed in the foreground, zooming on small images
by default, by setting a min width depending on the screen width. We
also avoid using a zoom too large to avoid very low resolution.
The widget allows zooming as long as the image stays in the frame.
The user can zoom both with the mouse scrolling and + and - buttons,
sized to allow medium screen (tablets) to press them accurately.
All keys are disabled but the 'ESC' one when the Zoomer is open to
avoid (undesired) survey navigation.
Task-2566584
closesodoo/odoo#73718
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
*: im_livechat, snailmail_account, survey, web_editor.
The callback registered by the bus service method onNotification was
not the same unregistered by offNotification. Since those method were
superfluous, they have been removed in favor of (add/remove)EventListener.
closesodoo/odoo#96684
Related: odoo/enterprise#29819
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: calendar, im_livechat, survey.
Following @ged-odoo review, the multi tab service has been improved:
- multi_tab_service.js has been moved to the correct location.
- _callLocalStorage method has been removed and replaced by
getItemFromLocalStorage/setItemToLocalStorage.
- underscore.js calls have been removed.
- multi_tab_service is now using function closure style instead of class.
- multi_tab service is now using its own bus instance.
- service name is now in snake case as per convention.
- tests have been added.
- multi tab service now handles setting/removing/getting values
shared between all the tabs.
closesodoo/odoo#96386
Enterprise: https://github.com/odoo/enterprise/pull/29694
Related: odoo/enterprise#29694
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: calendar, survey.
In order to ease the PR introducing websockets in Odoo, introduce
the multi service. Indeed, the cross tab bus won't be necessary
anymore but there will still be a need to elect a main tab: some actions
should only be triggered once. To achieve this, the code electing the main
tab has been split with the one handling the longpolling. The crosstab
bus now relies on the multi tab service to known whether or not the
current tab is the main tab.
task-2053917
closesodoo/odoo#96174
Related: odoo/enterprise#29573
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
on/off are deprecated in favor of addEventListener/removeEventListener.
Calls to the bus service have been updated to reflect those changes.
task-2053917
closesodoo/odoo#96017
Related: odoo/enterprise#29501
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
> Media query mixins parameters have changed for a more logical approach
> media-breakpoint-down() uses the breakpoint itself instead of the next
> breakpoint (e.g., media-breakpoint-down(lg) instead of
> media-breakpoint-down(md) targets viewports smaller than lg).
> Similarly, the second parameter in media-breakpoint-between() also
> uses the breakpoint itself instead of the next breakpoint (e.g.,
> media-between(sm, lg) instead of media-breakpoint-between(sm, md)
> targets viewports between sm and lg).
https://getbootstrap.com/docs/5.1/migration/#sass
Task ID: 2766483
Part-of: odoo/odoo#95450
- BS5 uses native inputs instead of pseudo-element for some
input like checkbox, radio, ...
in BS5 input checkbox don't have "virtual visual" checkbox anymore
(::before), so we remove the relative's rules
- removed `.custom-control` class
- `form-switch` use a new layout system in BS5 we adapt the code to
match the Bootstrap approach (inline SVG).
- In tests, we don't check the exact value of the background as it
change in community/enterprise, and it's difficult to check the value
of an SVG.
- Overflow in progressbar is now hidden.
-> we had to restore it.
- In BS5 margins in forms/inputs has been changed
-> we had to restore it (e.g. 'mb-3')
- .form-group, .form-row, .form-inline
> Dropped form-specific layout classes for our grid system.
> Use our grid and utilities instead of .form-group, .form-row,
> or .form-inline.
- .input-group-append and .input-group-prepend
> Dropped .input-group-append and .input-group-prepend.
> You can now just add buttons and .input-group-text as direct
> children of the input groups.
Ref:
[1] https://getbootstrap.com/docs/5.1/migration/#forms
Task ID: 2766483
Part-of: odoo/odoo#95450
The logic not identical in BS4 -> BS5
The color contrast system in BS5 relies on WCAG 2.0 contrast algo.
So color-yiq is converted to color-contrast.
Note that there are some "texts/buttons/other visuals" elements
which will not have the same contrast as before.
$yiq-text-dark and $yiq-text-light are respectively replaced with
$color-contrast-dark and $color-contrast-light.
Note that we had to use '$min-contrast-ratio: 2.2' for .o_tag_color_X badge.
Task ID: 2766483
Part-of: odoo/odoo#95450
Co-authored-by: Stefano Rigano <sri@odoo.com>
Currently, in demo data (or data) of some surveys, there are records of
'survey.question' having 'is_page' field value as true and 'question_type'
is not defined. When question type is not defined, default value
'simple_choice' is assigned to the 'question_type' field. Now when we
create a live session of that survey and goes to the page, it tries to read
the data for bar chart but data is not available (undefined) and throws the
traceback. This happens because question types 'simple_choice' and
'multiple_choice') are expected to load a bar chart.
It used to work before commit[1] where default 'question_type' value was
being set to 'text_box' (so attempt to load bar chart was not made).
As a safest fix in stable, this commit adds condition in JS and in template
to make sure that bar chart will be instantiated only if the data needed by
(checked with JS) and when the question is not a 'page' (checked with
template).
commit[1] - https://github.com/odoo/odoo/commit/1fb99d7#diff-cf2aadbf6a252dfca6d3450a0ce6ad280b1924afe9a8fc22f7077c998d080009R52
taskID-2841582
closesodoo/odoo#95055
X-original-commit: d7c485e0b0791b6d3d127fedf867b9664df05463
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit imporves the usability of scoring fields and single-multi
choice question in survey. It does the following changes:
Backend:
- if it's a scored question, respective correct answer must be provided
otherwise it will now give a warning while trying to save
- points are hidden unless it's a scored question (and will be inline now,
next to 'Scored' checkbox)
- compute answer_is_correct based on question type of numerical, date,
datetime for both scored and non-scored questions.
Frontend:
- if the answer is wrong, display the answer inside a red container and below
the wrong answer, also display the correct one in green font
- if the answer is right, display the answer in a green container
- if the answer is skipped, display the text 'Skipped' inside red container
with lower opacity
- hide the div for question description if it's empty, to avoid unwanted
space bewteen questions
- added two different icons 'fa-check-circle' and 'fa-times-circle' for correct
and incorrect answers respectively for single-multi choice question
- show answer is correct and incorrect based on is_correct not on scored values
- show skipped string for single choice, multi choice and matrix questions in
result page if question was skipped
closesodoo/odoo#63915
Taskid: 2276724
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
*: website_blog, website_event, website_forum, website_links,
website_livechat, website_slides, survey, web_editor
This commit removes the website navbar root widget, as the edition is
now handled in the backend through the client action and custom menus.
It removes associated widgets and their css.
See merge commit for more information.
task-2687506
PURPOSE:
Clicking the live session's "go to" url in the presentation mode now copies
the url instead of redirecting the presenter, to prevent him of joining the
session in user mode as it messes up.
Task-2816685
Part-of: odoo/odoo#88434
PURPOSE:
This commit allows to handle the situation in which the quick access
link is used but the live session is not launched yet, by showing an
appropriate error message and by allowing a user with sufficient rights
to launch the live session directly from the quick access page.
Since a session can be launched multiple times, the error related to
closed sessions has been removed, so that the user with the rights to do
it can also "relaunch" a session if it has been closed before.
Task-2816685
Part-of: odoo/odoo#88434
PURPOSE
This commit removes a few unessential content, fixes
misalignments and removes the input autofocus on mobile devices
SPECS
Remove a few unessential content
Some contents take a considerable space on mobile without adding
essential information, requiring the user to scroll to see useful info.
These contents are now removed on mobile devices.
Fix misalignments
Some parts were misaligned on small screens, taking unnecessary space or
cutting parts of sentences. These parts have been adapted to handle
small screens.
Remove action buttons related to live sessions on small screens
Since the presentation mode doesn't look good on mobile devices
(questions have a lot of linebreaks, arrows do not always work),
and since normally no one presents a live session using a mobile
device, the action buttons "Create Live Session", "Open Session Manager"
and "Close Live Session" are now hidden on small screens.
Remove the autofocus on the first input in survey forms on mobile devices
When a new page of a survey is loaded, the first input is autofocused so
that the user can directly complete the survey without manually getting
the focus. This causes inconsistencies and undesired behaviors on mobile
devices. Especially, when the focus is set automatically on Android devices,
the soft keyboard is opened, the viewport is reduced and the view is scrolled
to the input, which involves that the user misses information about the
survey (such as the beginning of the question for long questions), or
section descriptions. The autofocus has therefore been removed for mobile
devices.
Task-2622693
Part-of: odoo/odoo#87990
Purpose
=======
Change all masculine nouns in Odoo's code to neutral nouns (when
possible), making sure that demo data is correctly handled. This is
particularly important since our code is open source, and nowadays lots
of machine learning models are trained on open source repositories.
With this small change we contribute to training more "fair" models, and
teaching models that "employee" or "user" != "he".
This also affects some text visible by the user, hence making it more
inclusive for Odoo users.
Task-2853046
closesodoo/odoo#91292
Related: odoo/enterprise#27302
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Set the survey in fullscreen (without the ribbon) and fixes the 404 page when
refreshing the survey management end page.
The end page has also been slightly modified by:
- hiding the header because it only contains relevant information when the
survey is running (link to join, number of person having answered the current
question, ...)
- hiding previous arrow which were not working (as the session is closed)
- hiding the next arrow which is not relevant and wasn't working
Task-2791044
closesodoo/odoo#90225
X-original-commit: dd6b007e174c19aeb45c1530aff987c393e36f70
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
For surveys, we want to allow the end-user to un-tick an option he had ticked
before, for any kind of questions with choices (simple / multi-choices and
matrix).
e.g: You select an option but on second thoughts you're unsure it's the right
answer, you want to be able to remove your answer.
Especially if the question is not mandatory and you loose points if you don't
answer correctly.
Since the base browser behavior does not allow un-ticking a previously ticked
radio input, we have to play around a bit with specific classes.
Task-2727592
closesodoo/odoo#82272
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.
Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)
closesodoo/odoo#84280
Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
In ae4435af, two fonts were added without a clear licensing.
With this commit, they are replaced with more recent and better fonts
with a clear OFL license.
closesodoo/odoo#84223
X-original-commit: bec81ca1870f0dcedcc781a7dbb907bdade78e69
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
Steps to follow
- Use an odoo instance without the planning app
- Go to the survey app > feedback form
- Click on "See results"
- Print the document with your browser
-> The output only contains the first page
Cause of the issue
A height of 100% is set to the html element
It works with the planning module because this css is present
https://github.com/odoo/enterprise/blob/ead53fcca721aaa06619b4113707cae3fe086731/planning/static/src/scss/planning_calendar_report.scss#L57-L60
Solution
Unset the html height property in the survey layout
opw-2724319
closesodoo/odoo#83370
X-original-commit: 2c2f9a13a8251791ea24e93927f9a45e8dda2c14
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
PURPOSE
Various improvements of the results' statistics were required, mainly regarding
* the filtering features that were not clear and impractical
* the way answer scores was reported
* the vertical space taken by questions never answered
Among other smaller changes, the layout of `datetime`-answers questions is
harmonized with the other answer-types (grouped by value), considering that
the "time" part is important and that the "seconds" part bof that time would
only be changed if it is relevant to the question.
SPECIFICATIONS
**Filters**
It is now more convenient to filter surveys based on:
- Whether they are fully completed
- Whether they are passed
- Whether they are failed (last 2 are mutually exclusive, and only available
for scored tests)
A badge is added to show the number of surveys that match each filter option
if chosen. Note that this simple implementation does not allow to show the
number of surveys which would be displayed if the filter was removed, or
replaced, so the badges are not shown once a filter is selected.
The question/answer filters can now be removed individually.
The i.fa-filter elements used to activate them are now always visible, and are
only available for answers that have been selected at least once.
**Scoring**
Scores are added in tables next to the answers instead of as additional lines
below the question caption.
Right answers are now marked in the Graph and Data tabs instead of being simply
listed under the question.
**Unanswered questions**
To make this special case more clear to the user, a discrete alert is added
below the question. The Graph and Table tabs are removed in this case, as they
contain no information. For Multiple choice and Matrix questions, the Table tab
stays visible to show the possible answers available.
*Misc*
To follow common representation, numbers which are equal to integer values will
show as integers in answers and scores (e.g., 30.0 will show as 30), using a
sub-template.
Distinguishing the questions and results from the previous/next ones was
difficult, hence the added margins and discrete lines.
Similarly to other fields, datetime results now display one line per answer
value, with its occurrence.
Stylesheets are cleaned up.
LINKS
Task-2618399
closesodoo/odoo#77522
Related: odoo/upgrade#3168
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, we allow the user to press CTRL+Enter to force the submission of his
answer for that question when the focus is within a textarea.
However, we do not want to submit the question if CTRL+Arrow-right is pressed
(since you may use CTRL+arrows to navigate within your text).
In the same fashion, we don't want to select "option C" if you use CTRL+C to
copy some text in the textarea.
This commit fixes these use cases by only allowing the shortcut handling when
the focus is within a textarea when the pressed key is 'Enter' (code 13).
Task-2716078
closesodoo/odoo#82203
X-original-commit: 69de8e29053119195266379facb8231ba4f51944
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Purpose
=======
When presenting a live survey, the page does not give a
confirmation message when the survey ends and stays on the last slide.
A "Thank you!" message is now displayed when the presentation ends.
Task-2700222
closesodoo/odoo#80447
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
This commit globally improves the backend survey module usability, notably by
renaming labels, moving menu items around and cleaning unused features.
SPECIFICATIONS
These changes include (non-exhaustive list):
On questions
- Changing labels, action helpers and modules description to be clearer;
- Re-organizing the survey.question form view, notably to clearly distinguish
fields related to answers and validation options;
- Removing the "Clean test answers" server action as it can be done through
a search + unlink;
- Removing the allow_value_image field as we now always display the
image field. Users simply choose to let it blank;
On surveys
- Re-organizing the survey.survey form view fields to get a clear view of
the various options;
- automatically update scoring type when checking certification: if not one
linked to scoring, update to scoring without answers;
- set create as create_multi to speedup batch creation;
- Changes ACL rights for user_input_line. Now, only Survey Managers can
change answers. Survey users keep only a read access on answers, meaning
changing what customers / people answered is now limited to managers;
Globally
- Moving menu items and make them visible outside debug mode;
- Answer recap on print frontend page is now visible whenever a scoring is
applied, not only for certification, as if scoring is activated seeing
answers is probably wanted;
Task-2600241
closesodoo/odoo#79813
Related: odoo/upgrade#3033
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adds the background per section feature.
If the section to display has a background image configured, the background
will be refreshed using that section background image.
If the section has no background, the survey background is used.
The background is refreshed at the same time that the next question is loaded.
To ease technical maintenance and to keep it simple, the background is always
faded out/in at each page change only if there are some sections on the
survey that has a specific background image. If no background image are set on
the survey sections, the background will never be faded out.
Note: The next section to display depends on free text (section with
description) configuration and on conditional questions.
The next section to display can be the next question's section or directly
the next question itself (if the question is a section).
This section's background image implementation works both for the regular
survey form as well as the "live session" mode of the survey module.
Task-2225393
closesodoo/odoo#79156
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
When the user opens the survey module for the first time, the user may
find it difficult to create and configure a new survey as there are many
options available. To improve the onboarding experience of the user, we
will provide a new link on the action helper of the survey module (for
the kanban and the list view of the surveys).
When the user clicks on that link, the system will open a new modal. The
user will then be able to choose a sample to load. Each sample will be
pre-configured for specific purposes. We will have:
- A sample for the feedback forms
- A sample for the live presentations
- A sample for the certifications
After loading a sample, the user will be able to adapt it to fit their
needs. Thanks to the samples, the user can create a survey more easily
and more quickly.
task-2670605
closesodoo/odoo#79255
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Co-authored-by: Carlos Valverde <cvs@odoo.com>
PURPOSE
When dealing with lot of surveys kanban view is not really optimal and its
state based grouping is not really helpful. Indeed we do not have total of
each coumn and there is not point adding new states, meaning most surveys
hang in the same column. This is not an optimal display.
SPECIFICATIONS
Improve ungrouped display as this is the main usage of surveys. It should
be displayed like a global list view: each card should take the whole
screen (like ``Visitor`` kanban view). Each line contains some "columns"
holding statistics. We notably use a progressbar to display a nice passed
ratio, as well as a many2one avatar widget to make survey enters the era
of amazing wow kanban views.
When grouped, display should be the old one, aka a standard card.
This is done using a small CSS hack: card template actually consists in main
templates related to two displays. Each card style is hidden depending on being
groups or ungrouped. This triggers a class that is used using CSS to hide
irrelevant content.
A ribbon is also added on kanban cards displaying an Archived danger ribbon
when survey is not active anymore. It is therefore coherent with the form
view display that also has a ribbon defined.
An override in website_slides_survey is added to add number of courses using
the survey.
Order is updated so that new surveys are on top. No need to be bloated by
old ongoing surveys when creating new one.
Finally, some labelling is done with answers to be clearer: registered (number
of raw user inputs), completed (finished answers), certified or passed (quiz
with certification activated or not).
Task-2388785
Part-of: odoo/odoo#77227
This commit slightly adapts the survey navigation buttons to make sure that
they are always positioned at the same spot.
Before this change, if you rapidly click the "back" button a lot of times, when
it disappears, you will misclick the "Odoo" button and land on the Odoo
website, which can be very annoying during a real test with a timer.
Now, we disable the button when it becomes non-clickable instead of removing
it, so that it always stays at the same spot.
Task-2665998
closesodoo/odoo#78513
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
* = auth_signup, calendar, im_livechat, snailmail_account, survey, test_mail,
web_editor, website_crm_iap_reveal, website_livechat
The aim of this PR is to improve/fix various flaws and limitation of the current
API, to make it easier to use and more efficient.
Notification are now defined with 3 distinct parts:
- the channel determines which client(s) should receive it
- the type determines how it should be handled
- the payload determines any extra information helpful for handling it
Channel
=======
Business code
-------------
- Record channel is introduced for ease of subscribing to and sending
notifications to specific partners, channels, documents, ...
- String channel is still supported (but it is converted internally to the tuple
channel).
- Tuple channel is still supported without any change (but should be avoided
whenever possible due to its complex syntax).
The channel is no longer sent to the client. When the channel was used for
business purpose, the information it contained has been moved into either the
new type, or the payload itself.
Technical note
--------------
All channels are now internally converted to the tuple (db, ...) channel, which
is necessary for the platform code (saas/sh).
Internally, the bus.bus table is not changed, type and payload are grouped
together into what was (and still is) called message.
Type
====
Type is introduced to uniformize the way notifications are sent and handled.
All existing notifications already had some kind of manually-built type in them.
This is now officially supported at the bus API.
In client code this will allow (to be done in future commits) to register one
handler per specific type, instead of having to iterate and to filter all
received notifications on every handler.
Payload
=======
Payload (ex message) did not change, it can still be anything depending on
business needs.
Few adaptations:
- When the type was included on the payload, the type has been moved to the new
type parameter.
- When the channel was used in business code, its data has been copied into the
payload.
task-1891151
closesodoo/odoo#79201
X-original-commit: 543af27c7d6836ffac9e80ff8490b6ddbd849221
Related: odoo/enterprise#21998
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose
=======
Have the "or press CTRL+Enter" (metaKey if it's a mac) shown if the input field selected is a text area, and "or press Enter" otherwise.
Hide the text at the beginning of the survey if it's from mobile.
PR: odoo/odoo/pull/77726
Task-2637120
closesodoo/odoo#77726
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
Let's consider the following two scenarios while answering time limited survey:
1) attendee's system clock is de-synchronized compared to the real time
2) Odoo server clock is de-synchronized compared to the real time
In any/both of the above cases, it will lead to a wrong timer display, and will
confuse the user and/or make him fail the test because he will think he still has
more time to submit when he does not.
With this commit:
To fix this, we simply get the offset of server UTC time and moment time, and apply
the offset while calculating the time remaining.
Task-2612972
closesodoo/odoo#77419
X-original-commit: 9e9cd045b2899abc5c8e4a92c43ed6eb2eea158a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, if the user configures his survey with questions of type
'simple_choice', 'multiple_choice' and 'matrix', but doesn't configure any
selectable choices, the survey result page can crash.
This is not really a "standard" use case but this commit adds a few checks to
avoid a complete traceback and instead give empty data results.
Task-2622869
closesodoo/odoo#75586closesodoo/odoo#76606
X-original-commit: 8051be7c96417cf2feb9d542bb3d230022c8cc54
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Average duration of each survey is added. To avoid performance issues value
is not stored, and calculated with raw SQL. It requires to have an end
datetime on survey user inputs, allowing to compute average duration it
took people to complete survey.
Live surveys now open in a new tab instead of in-place.
Also rename some css / scss files to ease understanding. Remove unnecessary
class on survey form view.
Task-2634805
PR odoo#72298
Part-of: odoo/odoo#72298
Co-authored-by: David Beguin <dbe@odoo.com>
Co-authored-by: Mariska Archielli <ram@odoo.com>
Co-authored-by: Thibault Delavallee <tde@odoo.com>
This commit adds the possibility to force the form submission by pressing the
CTRL+Enter keys.
Previously, it was not possible to submit a textarea answer using the keyboard.
Task-2484885
closesodoo/odoo#68310
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adds a new chart at the end of a scored survey.
Previously, you could see your "Overall Performance", meaning what was your
percentage of correct/partially correct/incorrect/skipped answers for all
the survey scored questions.
Now, we added a new chart new to it that shows the percentage of
correct/partially correct/incorrect/skipped answers but for each section of the
survey.
This allows the user to see in which section(s) he did the most mistakes.
Task-2484885
Issue
- Install 'Survey' & 'website' module
- Enable "es_VE" language and activate on main website
- Go to Website Homepage
- Switch to "Spanish (VE)" language (footer)
- Go to "Survey" module
- Create a survey:
- Add a question of type 'Date' then save
- Click on "TEST" button
- Start survey and add a date with the datepicker
- Submit survey
Error message : 'This is not a date'
Cause
When submit survey, not using the database date format.
Solution
When validating form (on submit), check if date is formated
with database format and (not the moment locale since user can
alter date and datetime format).
opw-2452237
closesodoo/odoo#71228
X-original-commit: f3c5dd794e4de71187fd7532c39595b2297eb93d
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
`_(xyz)` will wrap them in an underscore.js object, which when used in
a string context will just return the string. So it's basically a
no-op, but it certainly doesn't translate the terms.
closesodoo/odoo#70476
X-original-commit: 92352ed2b5524c97b0aeeba3193c6a8d93ed82a1
Related: odoo/enterprise#18172
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>