This commit properly formats the domain attribute of few fields so that
the technical tooltips for them do not show '\n' within the domain.
Below are the improved fields:
- 'triggering_question_id' (for model 'survey.question')
- 'partner_ids' (for model 'survey.invite')
Taskid-2704057
closesodoo/odoo#81631
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
SPECIFICATION
Before this commit, when clicking on the 'See Results' button
the page was loaded on the previous one.
After this commit, the page will open in a new tab.
We also took the opportunity to replace all the '_blank' value
occurence by the 'new' value as '_blank' value is not a valid
value for the 'target' field of the 'ir.actions.act_url' model.
LINKS
Task-2700305
PR : odoo/odoo#80858
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
=======
As an Interviewer, I want my questions to be as clear as possible. To this end
I would like to be able to detail a bit which kind of answers I expect.
Specifications
============
For all the question types that require an input, display a char field
"Placeholder" in the Answers tab with an helper that says:
"When set, this text will appear in the field to help participants answer."
Then on the survey, display the placeholder in the question input zone.
Task-2671388
closesodoo/odoo#78682
Related: odoo/upgrade#2998
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.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
RATIONALE
Currently we can specify email used for notification layouting through context
use in mail composer. It is then propagated to message_post, stored on
mail.message and used to encapsulate emails sent based on posted messages.
SPECIFICATIONS
On template model: rename ``notif_layout`` parameter of ``send_mail`` to
``email_layout_xmlid`` to be coherent with naming used in other parts of the
code. Moreover it better indicates we expect an xml id.
On rating model: rename ``notif_layout`` parameter of ``rating_send_request``
to ``email_layout_xmlid``, for the same reasons as above.
In various wizards: support ``email_layout_xmlid`` context key when no field
is available, notably because this is still done manually in some wizards
like survey invite. Keep a fallback on ``notif_layout`` but remove support of
``custom_layout`` deprecated since quite a long time.
Task-2621326 (Mail: add 'view' button in 'light notification template')
Task-2647302 (Mail: add layout field in composer)
Part-of: odoo/odoo#76418
* = 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>
BEFORE THIS COMMIT / How to reproduce :
Consider a multiple choice question with single answer.
A. 2 points
B. 1 point
C. -1 point
Here, the user can only select one answer. He picks A. He only obtains 2/3 points.
This is because the maximum score was computed as the sum of all positive scores
for the question. It does not make sense, as the student can only pick one answer.
Therefore, the formula does not allow giving partial scores (here, answer B, close
to the correct answer) while maintaining correct score percentages.
AFTER THIS COMMIT:
The sum of positive scores is still used as maximum score for multiple choice
with multiple answers, as we want the student to pick all good answers for max score.
However, for multiple choice with single answer, we use the maximum positive score
(or 0, if none) among answers, as it the maximum score one can get while selecting
a single answer.
-> example above : I pick A, I obtain 2 points out of max(2, 1, (0)) = 2
-> I obtain max score for the question. 2/2.
ps: As the sum only uses striclty positive values, the negative points are still
operational and the flow is not changed.
TESTS:
A test test_partial_scores_simple_choice is added to make sure the simple_choice
is repaired and always gives 100% of points if the best answer is picked.
Task-2533836
closesodoo/odoo#77426
X-original-commit: 2cdfb7805564943ccf857e49b41d3b597fd727bb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, if the survey participant does not answer questions of type:
- simple_choice
- multiple_choice
- matrix
The system does not register any survey.user_input_line with the "skipped"
attribute set to True. Meaning that this question's answer will not appear in
the survey statistics as skipped (in fact it will not appear at all).
This commit makes sure we correctly save a user_input_line set as skipped=True
when not answering to those types of questions.
A unit test has been added to make sure that we consider every non-answered
question type as properly skipped within the survey statistics.
Task-2622869
X-original-commit: 87ea302044ff7ac26888000101254b1af2524046
Part-of: odoo/odoo#76606
Calling `_get_answer_score_values` on each question creation or update is
not necessary if value is already provided.
Followup of odoo/odoo@0d32ed45aeclosesodoo/odoo#76223
X-original-commit: c6c7605cdae803aca4f441ef4e622a1b79f17019
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.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>
If for any reason the initial linked question of one possible answer was
changed and if one existing survey has already been answered using that
possibility, we currently got an Internal Server Error while we should
simply just ignore these answers when getting the statistics of that
survey.
closesodoo/odoo#75758
X-original-commit: 87096c284872f9aa99f5ae9096cee92663c4933e
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Currently, while trying to share the survey with 'one page per section'
layout, if the survey has only questions and no sections, a warning is
raised that says 'You cannot send an invitation for a survey that has
no questions'. It is misleading because in this case, what you do not
have is atleast one section with question(s).
This commit fixes the warning message for 'one page per section' type
of survey and gives clear idea to the user about what is missing.
TaskID-2611996
closesodoo/odoo#74694
X-original-commit: 381d18888d81f6797004c718fee5dbd9706b3122
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Create a survey with passing score at 80 point
- Some user complete the quizz with 85 point, the quizz is "passed"
- If you update the passing score at 90, the quizz completed by user are now "unpassed".
This PR avoid to recompute quizz_passed.
closesodoo/odoo#74238
X-original-commit: d5355037545fb8366675b792f8cc5ed30ecca1bf
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
Updating a completed survey will raise an error with a traceback.
To reproduce the error:
(Use demo data)
1. Survey > Participations
2. Select a completed form
3. Change one answer, Save
Error: A traceback appears "[...] ValueError: Computing score requires a
question in arguments."
Here is an extract from the method concerned:
```python
@api.model
def _get_answer_score_values(self, vals, compute_speed_score=True):
"""
[...]
"""
user_input_id = vals.get('user_input_id')
answer_type = vals.get('answer_type')
question_id = vals.get('question_id')
if not question_id:
raise ValueError(_('Computing score requires a question in
arguments.'))
```
This method needs some information to work properly.
OPW-2488974
closesodoo/odoo#70328
X-original-commit: 62cd2c0be63738f0bbefd62de5d025990e63824f
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
PURPOSE
=======
For now, the host can't go back to the previous screen on a live session.
Why would he want to go back? Misclick, want to display again the result, other
SPECIFICATION
=============
On a live session, let the host go back to the previous screen.
Do not "restart" the questions but display the graph with the results.
This back capability is independant of the "back button" survey option.
Even if the back button is disabled on the survey configuration, the host must
still be able to go back during a session.
Task ID: 2351759
closesodoo/odoo#59659
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Right now while previewing the certification template, the proper title is not
displayed on the tab of browsers.
This commit improves the behavior by adding name of the certification in title
so that use can see the proper string on browser tab. For doing so, we create
a new wrapper template that sets the title for the page, and use an iframe
to loads the pdf file from existing controlloer (which returns response for the
preview pdf).
Task ID-2341847
COM PR odoo/odoo#66028
This commit enable users to set a 'Responsible' for the survey by
adding 'user_id' field. Demo data for the same is also updated.
Task ID-2389434
COM PR odoo/odoo#62712
ENT PR odoo/enterprise#15217
UPG PR odoo/upgrade#2006
The goal of the draft state on survey is to have the survey under edition
mode before before sending it to participants. Under this mode:
- the responsible can test it (can be done with "In Progress" mode)
- the survey can't be answered (same as the state closed)
The risk that the survey can be leaked before being ready is really
limited. If it's a live survey, participants will have to guess the
4 digits access code and wait for the host to go to the next question.
Else, participant will have to guess the token.
Considering these facts, the use of the draft state is very limited so
'draft' state can be dropped. If we do so, we are left with only two
stages that are 'open' and 'closed'. But whether to consider survey
open or closed can be simply achieved with active field we already
have (if active=False, survey is closed, otherwise it's considered
as open).
So with this commit, we remove the state field from survey and thus
simplify the flow. It means that we no longer require 'Start Survey'
button, and so that button is also removed, and for the closed surveys,
instead of the button 'Set to draft', now we have a 'Reopen' button
which will activate the survey. And instead of displaying few buttons
after saving a record, we now display all the buttons from beginning.
Task ID-2389434
COM PR odoo/odoo#62712
ENT PR odoo/enterprise#15217
UPG PR odoo/upgrade#2006
No need to force a new title on duplicate if something is already given.
Task ID-2265556
PR odoo/odoo#52391
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, if a badge is set on the survey, duplicating it always
results into a traceback due to sql constraint. Indeed due to uniqueness
constraints between survey and badge having the same badge for a duplicated
survey was leading to an error.
We had two options
* duplicate the badge itself;
* remove sql constraint and add a required on badge in view when having
a certification (aka, survey giving a badge);
First solution is somehow limited. It means updating badge name, checking
its goal, ensuring all parameters are ok. Moreover it is quite hidden when
duplicating survey. End users will maybe not see what to are doing.
We choose to remove copy flag on flag and badge. That way end users have to
manually re-check the flag, and create a new badge. We remove the hard
constraint and set a required in the view so that functionally behavior
is the same.
Task ID-2265556
PR odoo/odoo#52391
Purpose is notably to display last survey attempt as "Date of certification"
instead of first one. We therefore set an _order on survey.user_input model
(user participation to a survey) as create_date desc. When several attempts
are made the last one will be considered when doing a search with limit=1.
Closes#61362
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The open_action_with_context was not using _for_xml_id, producing an
error when reading the action content.
In open_action, the action_name was taken from the context and needs
sanity checks. Ensure only actions from the account module can be
read and only if the user has access to the target model.
This is a limitation of the previous behaviour but, at the moment, all
known calls are made refering to an action from the account module.
Limit the scope of this method while the 14.0 is still early to avoid
having a door open to ready any action, and difficult to close later.
Remove old action fetching from the context in create_move that is no
longer used.
closesodoo/odoo#61602
X-original-commit: a39e94f7e4dc74e850650ac90bbc5f85af130bc8
Related: odoo/enterprise#14695
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
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.*
Purpose
=======
This commit intends to improve the animations on the leaderboard during survey
sessions. We now show both the ranking of each attendee before and after taking
into account the current question scores.
It allows attendees to see their position in the leaderboard shifting up / down
depending on how well they answered, and adds a bit more interactivity during
the session.
Specs
=====
The code changes to make this happen implied having multiple layers of
animations running one after the other.
The use of async/await in the JS allowed for a much smoother and less indented
code, simplifying the reading.
We now have 2 different "bars" to handle:
The bar that shows the previous leaderboard position.
The bar that shows the current question score.
This means we handle both jQuery items and modify their size & transition
properties depending on our animation.
Unfortunately, all these animations required a lot of testing to find fitting
timings, which means using quite a few setTimeout with "magic" delays.
These were just the most good looking ones and it feels like naming them with
a constant would not really help.
We also slightly improved the graphic font size / styling to make it easier to
read for potentially far away attendees.
Task 2235815
closesodoo/odoo#50991
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
As there is no session object, it is not possible to generate a randomised set
of questions that will be displayed for all the clients.
When getting the most voted answers while checking which question is the next
one to display, or if this question is the last one, predefined questions are
regenarated each time a fake user input is created (the most voted answers.)
So at the end, while checking if a question is the last one, we compare
different objects.
This is not an issue for non-randomised survey, as everything is constant.
So, until a solution is found to keep information related to a session in
particular, randomised questions mode will be ignored in live session mode.
Task ID: 2230980
X-original-commit: 7f0981c4a61429802a5fe24dd794221b1275dfe3
Unanswered questions or sections are now hidden in the survey review mode.
Only the question answered by the user will be visible.
If the survey was done during a session, the users will see their own answers,
even if the theme they selected was not the most voted one (in case of
conditional questions).
To get the questions to display :
- questions that have been answered
- + the ones that should have been answered = active questions
In session, active questions are based on most voted answers)
This commit also fixes the randomized questions handling in most voted answers,
as copied predefined questions where <NewIds> and those was not usable in
some templates.
Task ID: 2230980
X-original-commit: 8ca79727d5a93b91746c1e63d59d08550417906c
Before this commit, is_last_page_or_question was determined only in function
of next active questions : If there are no active question after the current
one, current question is the last one.
But, in conditional questions context, if the current question is conditionning
the display of latter questions, when we display the current question, we
cannot already know if we are on the last question, as user did not answered
yet.
After this commit, the current question is the last one only if
- there are no active questions that follows
- AND the current question is not conditionning the display of other questions
For page_per_section, we check the same rule for all section's questions.
Task ID: 2232973
X-original-commit: 12d962e579d2480fbf821fb381adebf47668dbcc
As section with description are now considered as potential questions to
display, the method to get the next question to display needs to check if
the next section should be displayed or not, depending on conditional
configuration and user inputs.
For page_per_question and page_per_section layout, the following rule now
applies:
If the section is empty (has no sub-questions):
Show it if section has description, else skip it. (in both layout)
If the section has sub-questions:
If a least one sub-question is active:
In page per section: show it.
In page per question: show if section has description, else skip it.
If no active sub-question: Hide it.
Apply also empty section rules to non conditional survey :
If a section is empty (no description and no active questions inside), the section
should not be displayed.
Task ID: 2230980
X-original-commit: f0ce3623e3cfc2451e3f7359ec09399e6e474c10
Before this commit, when computing the result graph data in the survey finished
page, a user answer for a question with no correct answer was counted twice,
once as correct, once as incorrect, as :
correct_answer == question_correct_answer == none
After this commit, we count an answer as correct only if question has a correct
answer.
Task ID: 2176630
closesodoo/odoo#54755
X-original-commit: 74a00111908556bce10ea3a5e748f5a5c81f6a40
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fixes all issues detected by the new pylint
gettext-variable test.
It converts some calls to the new syntax
_("Foo %s", bar)
to progressively migrate the code to the new syntax.
A few calls were not technically incorrect but still detected by the
linter.
_("Foo" +
"Bar")
has been converted to
_("Foo"
"Bar")
as it has the same effect and make sure the argument is of type
asteroid.Const instead of BinOp).
closesodoo/odoo#53683
Related: odoo/enterprise#11467
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
PURPOSE
Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.
SPECIFICATIONS
Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.
Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.
Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.
SURVEY USE CASES
- On survey.question, the question_type field should be emptied if the question
is a page (is_page = True)
- On survey.survey, if scoring is configured, the minimum scoring success
should be between 0 and 100 (added SQL constraint).
- On survey.survey, the certification field cannot be True if we're in no
scoring mode (scoring_type = 'no_scoring')
- On survey.survey, the attempts number cannot be limited (is_attempts_limited
is False) if the access mode is public and the login is not required.
- On survey.survey, we cannot give a badge (certification_give_badge is False)
if it's not a certification or if the login is not required.
- On survey.invite, the "subject" and "body" field are based on the template
used (template_id field).
MISC
- As "validation_email" works with "validation_required", we removed the
onchange on "validation_email".
- To avoid extra complexity with an onchange on "is_time_limited" and
"time_limit", we simply default the time_limit field to 10.
LINKS
Upgrade PR odoo/upgrade#847
Task 2187377
closesodoo/odoo#46291
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Create a new survey 'Test Survey';
- Add a section 'S1';
- Add a multiple lines text box question 'Q1';
- Add a section 'S2';
- Add a section 'S3';
- Don't move any of the section or question to avoid changing the
sequences, for the moment all the sequences are equal to 10;
- Change the survey layout to 'One page per section';
- Save the survey;
- Test the survey;
- Fill the 'Q1';
- Go to the last page and Submit the survey;
- Review your answers.
Before this commit, the question is empty, this occurs because the
question page_id is not set, in _compute_page_id, the sequence of the
question should be bigger than the question of the page (in this case
the section).
Now, the _compute_page_id was change to take into account the case when
the question has the same sequence as the page (section).
opw-2222045
closesodoo/odoo#49366
X-original-commit: 99f35075e3d1e418e096a29b7440152e746a1cd5
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
This commit fixes timer related issues on survey flows, for both regulars
surveys and survey sessions.
The timer was unreliable in its completion by a whole second, which had not a
big impact at the user level but could make some tests fail (randomly).
Side changes from this commit:
- Reduced delays in the survey session tests to speed up testing
- Removed some timer flickering on survey views
LINKS
Task 2230526
Runbot error ID 535
closesodoo/odoo#49178
X-original-commit: 15c72aec71d42624685fb0fc9df25279c7855310
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
On redirection, werkzeug converts locations from relative to absolute
URLs. Apparently the specific algorithm when given a relative *path*
changed between 0.14 and 0.15, or possibly these paths suddenly became
processed whereas before they were interpreted as absolute?
So in Werkzeug 0.14, `redirect('foo/bar')` was treated as
`redirect('/foo/bar')` but in 0.15 it's first urljoin-ed to the
current path before the redirection is effected.
This is an issue with slides, because survey's get_start_url returns
the url `survey/start/<access_token>` without a leading slash.
The result is that where with 0.14 the certification tour would do this:
GET /slides_survey/slide/get_certification_url?slide_id=39&fullscreen=1
GET /survey/start/<id>?answer_token=<token>
with 0.15 or above it does this:
GET /slides_survey/slide/get_certification_url?slide_id=39&fullscreen=1
GET /slides_survey/slide/survey/start/<id>?answer_token=<token>
Which weirdly enough doesn't work at all.
closesodoo/odoo#48982
X-original-commit: 82a23883748172c05d2562f244ffbc1558ce01fc
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Purpose of this commit is to synchronize active status of certifications to
their badges. When archiving or activating a certification, its badge is also
archived or activated.
Task ID 2170708
Community PR odoo/odoo#46563
Purpose of this commit is to call toggle_active or archive / unarchive methods
instead of manually writing on active field. Indeed this allows to trigger
business code related to archive / unarchive which is normally located
in toggle_archive (called by action_archive and action_unarchive).
Task ID 2170708
Community PR odoo/odoo#46563
Purpose
=======
Speed up survey completion.
Specifications
==============
This commit apply an auto commit when user select a choice on a simple choice
question or on a matrix question with simple choice.
The auto commit happens following those conditions:
- Only on simple choice and matrix with simple choice questions
- For matrix, only when last subquestion is answered
- Only when Back mode is active
- If this is not the last question
Link
====
PR #46768
Task 2208574
This commit slightly changes the way users navigate through the survey form:
- The back button was moved to the bottom-right of the screen.
- The "Continue" button stays at the center but there is also a "next" button
at the bottom-right of the screen (same behavior -> submits the form)
- Arrow keys (left + right) navigation is now supported
Technical note: As the survey navigation is now outside of the survey content,
that was re-rendered on every submit, we have to manually refresh the
navigation with a second template render on the controller side.
LINKS
PR #46768
Task 2208574
PURPOSE
Improve the various sessions flow to make it easier for attendees to reach the
session and to allow better interactions between the host and his audience.
This comes with small usability improvements as well as increased
"beautifulness" by using custom layouts & animations.
SPECS
This commit changes the survey sessions fade in/out delay for both the host
and the attendees.
When going from one question to another, the total delay is now 1 second
(instead of 2 previously), with 500 ms for fade out and 500 ms for fade in.
The previous delay gave an impression of "slowness".
The delays and "server lag reduction" on the attendees side were adapted
accordingly.
LINKS
PR #46768
Task 2208574
PURPOSE
Improve the various sessions flow to make it easier for attendees to reach the
session and to allow better interactions between the host and his audience.
This comes with small usability improvements as well as increased
"beautifulness" by using custom layouts & animations.
SPECS
- For live session only:
Currently, the "short link" feature is good but it still needs to be improved
with the following points:
- Make the default "code" shorter (4) and digit only.
- Allow to customize the "code"
- Check for potential collisions
Added at the same time:
- input element is focused when you land on the '/s' page.
LINKS
PR #46768
Task 2208574
== Fix results scored question display ==
This commit fixes the display for scored choice question.
The text "Right answer" was displayed twice.
== Add default values to avoid constraints inconsistencies ==
This commit adds a 0 default values to some of our validation fields on survey
questions.
Without a default value, the ORM would store "NULL" in the fields and then
allow users to define a "min" without a "max", that would result in an error
while trying to validate the answers to that question.
Furthermore, when creating a question from the frontend, the web framework will
always send 0 for all field values anyway.
The code change adds consistency and avoids potential errors on that issue.
LINKS
Task 2208574
closesodoo/odoo#48371
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.
This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.
closesodoo/odoo#46325
Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>