Commit Graph
445 Commits
Author SHA1 Message Date
dht-odoo 28422acfea [FIX] survey: improve the survey question form view
Right now, for the survey that has scoring enabled, when we try to
add scored question, the label 'Scored' is displayed twice, which
looks odd.

With this commit we rearrange the 'is_scored_question' and
'answer_score' field, and display them next to each other to
improve the view of survey question form view.

task-2704057

closes odoo/odoo#82161

X-original-commit: c5c8f5ddfc3c89b92288fa9a72977835b7614ae4
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-03 15:48:43 +00:00
Fabio Barbero f1b1286393 [IMP] survey: display final screen in live presentation
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

closes odoo/odoo#80447

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-14 12:40:04 +00:00
wde-odoo 1fb99d79b1 [IMP] survey: improve survey usability in backend
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

closes odoo/odoo#79813

Related: odoo/upgrade#3033
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-01 18:39:45 +00:00
David Beguin 51d131663c [FIX] survey: test if survey exist in survey_layout for background management
Since fd75481d52, we use the survey variable to compute the
background_image_url in the survey_layout. In some cases (notably in
survey_session_code template), this layout is used without knowing the
variable 'survey'.

After this commit, the 'survey' variable is tested before usage.

Also, this commit add the o_survey_background class to the t-attf-class that
already exists on 'wrapwrap' selector. Otherwise, by having both t-att-class
and t-attf-class, only the t-att-class is kept.

Task-2703147

closes odoo/odoo#80656

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-01 10:18:11 +00:00
Thibault Francois 59aa5f7c0e [FIX] survey: question not define in survey.layout on print route
How to reproduce issue
-----------------------

- Create a survey with more than one question
  - Layout: One page per question
- Complete a first survey
- Start a second survey but don't finish it

- Click on see result
- Click on the answer of the uncompleted answer

you got a traceback
'NoneType' object has no attribute 'id'

Node: <t t-set="page_number" t-value="page_ids.index(question.id)"/>

Why this is happening ?
-----------------------

question is define in survey_page_print template inside a foreach.
The scope of question thus is limited to this foreach.

Solution
--------

Declare question before the foreach in a t-set

closes odoo/odoo#80648

X-original-commit: d80ec72696010d668047c8fb1d9665f6aa1b2ee6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-30 19:08:12 +00:00
David Beguin fd75481d52 [IMP] survey: add background option per section
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

closes odoo/odoo#79156

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-30 11:20:45 +00:00
Julien BankenandCarlos Valverde dfffa1ed92 [IMP] survey: add an helper to load a sample survey
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

closes odoo/odoo#79255

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Co-authored-by: Carlos Valverde <cvs@odoo.com>
2021-11-26 10:31:45 +00:00
David Beguin d393f98a81 [IMP] survey: add question placeholder
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

closes odoo/odoo#78682

Related: odoo/upgrade#2998
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-26 10:31:41 +00:00
Thibault Delavallée d5b688956b [IMP] survey: display a list-kanban when being ungrouped
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
2021-11-24 14:04:20 +00:00
Thibault Delavallée f13857bf74 [IMP] survey: update views naming
As we are about to refactor survey views, especially kanban, let us rename
some views xml IDs. Especially they have few overrides so quick to do.

Task-2388785

Part-of: odoo/odoo#77227
2021-11-24 14:04:20 +00:00
ijas ahammed d41a32e1d9 [IMP] survey,website_slides_survey: improve certification list view
This commit improves the survey list view in eLearning certifications to make
it simpler. This is done through a new primary view, inheriting from the base
one in order to keep changes localized. The main changes are:

- removed the trophy icon from 'Certification' button as each of them
  here are certificates only
- improved string of `title` field to 'Certification Title'
- added `user_id` field with many2one_avatar_user widget after `title`
  in the base tree view (survey.survey_tree)
- updated strings from 'Success Ratio' and 'Avg Score %' to
  'Success Ratio (%)' and 'Avg Score (%)'.
- moved `answer_done_count` field after `answer_duration_avg`
- removed the field `answer_count`
- added float time widget to the field `answer_duration_avg`
  in the base tree view (survey.survey_tree).

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:34 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
Aurélien Warnon 77324d5dde [IMP] survey: keep navigation buttons at the same location
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

closes odoo/odoo#78513

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-16 10:49:13 +00:00
Thomas Josse 91db19c187 [IMP] mass_mailing_slides / survey / website_forum / website_[sale_]slides_* : enhancing the views in eLearning
Purpose
=======
This commit is enhancing the website_slides module.

Specifications
==============
It changes placeholders for certain fields, it changes helpers in some
of the views.

It updates some of the main views of the menus and corrects wordings
inside of them.

It activates the Graph and Pivot views for the reporting of
Courses, Reviews and Quizzes.

It cleans up some of the measures inside of the Pivot and Graph views
of each menus where it is available.

It also merges 2 models: slide.slide.link and slide.slide.resource into
slide.slide.resource with a type Selection field.
This is done in order to create a single table for the additional
resources of a Content.

It also improves the front-end of the module with minor changes.
It fixes the problem of long names inside of breadcrumbs.
It also adds a message when there is no leaderboard in /profile/users.

task-2597345

See odoo/enterprise#20480
See odoo/upgrade#2784

Part-of: odoo/odoo#75646
2021-10-22 11:09:16 +00:00
Fabio Barbero 54909f5339 [IMP] survey: update "Press Enter" tooltip depending on field type
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

closes odoo/odoo#77726

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-18 07:56:17 +00:00
Aurélien Warnon 524058919d [FIX] survey: avoid returning empty navigation template
This commit fixes the survey navigation rendering by always returning valid
HTML even when no buttons are displayed.

Indeed, in some cases, such as on the "thank you" page, we don't display any
buttons, meaning that the returned template will be an empty string, which in
turn prevents the re-rendering of this part of the page in the JS part of the
survey form management.

To avoid this issue, we simply add an enclosing div tag into the template so
that the template always returns valid HTML no matter the use case.

Task-2642787

closes odoo/odoo#78250

X-original-commit: 5504f9a1c13cee053f3142ad8eeb98d75311ee78
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2021-10-12 15:54:43 +00:00
Fabio Barbero 4f2375f524 [FIX] survey: display "Correct pill" only once in results
Bug
=======
Since fb7b30b the "Correct" pill is displayed twice in survey results.

PR: odoo/odoo/pull/77620
Task-2648054

closes odoo/odoo#77867

X-original-commit: bc8e2d67b5980bb963f0e663f3c3d761ca4af169
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-05 15:41:20 +00:00
dht-odoo 8281b1ecd5 [FIX] survey: display the absolute counter in time limited survey
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

closes odoo/odoo#77419

X-original-commit: 9e9cd045b2899abc5c8e4a92c43ed6eb2eea158a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-29 20:48:25 +00:00
Rémi a4159afe71 [IMP] survey: display description_done field
It is currently about impossible to edit this field. Having it available
in backend makes sense, allowing to fine-tune its content before publishing
or launching live surveys.

Task-2657694

closes odoo/odoo#77366

X-original-commit: a37842c69b23b136a60ac992770144698e553f2c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-28 19:51:16 +00:00
Mitul Shah 2119232747 [FIX] survey: properly display filter label
While seeing the survey results, user can filter the answers. When the
filter is applied, '>' character is added between each letter of the
filter label. This string formatting operation was needed prior v14 for
the answers of matrix type question. But with survey the refactoring
(see commit[1]), we already get the formatted answers from controller,
so we don't have to manage it from the xml template.

This commit removes string operation from xml template responsible for adding
'>' (greater than) character between each letter of the filter label and thus
displays the label properly.

commit[1] - https://github.com/odoo/odoo/commit/351a4439b3a28d3832cd9bf17840dc9feaad7231

Task-2638463

closes odoo/odoo#76968

X-original-commit: ccd0970d51a05378ac3cd7a8d86321a5cbbe98ae
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-22 13:47:12 +00:00
Aurélien Warnon 7c8cb23aae [FIX] survey: avoid crash for misconfigured questions
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

closes odoo/odoo#75586

closes odoo/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>
2021-09-16 08:36:06 +00:00
52fedc8e91 [IMP] survey: add average duration on survey
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>
2021-08-31 23:34:55 +00:00
Achraf (abz) bf77ba0f40 [FIX] survey: Use correct company in certification
Before this PR when you accessed a certification through one company and passed it, the certification pdf was under the name of another company.

opw-2577532

closes odoo/odoo#75669

X-original-commit: 9f4fafee95e1f621a0d0b3a8bd5da6d059fa20c6
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-08-30 07:25:55 +00:00
Aurélien Warnon 6231608961 [FIX] survey: fix survey form view "conditional" question icon
Since the latest OWL refactoring, "button" DOM element in tree views cannot
be defined without an associated action (it will crash on click).

In the survey module, we use a "fake" button to mark a question as conditional
(based on the answer of another question). The button functions as a simple
icon and has no attached action.

To fix the issue, we now mark the button as "disabled" so the click action will
not trigger anything.

Task-2618108

closes odoo/odoo#75158

Related: odoo/enterprise#20049
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-16 13:18:14 +00:00
Julien Banken b6974528f9 [FIX] survey: add support for 'disabled' attribute on buttons (in views)
In the xml file of the list view, it is possible to define a button that
will be placed in a new column. When the user clicks on a button from a
list view, the script will execute the action linked to the corresponding
button. Unfortunately, all the buttons of the list views are not necessary
linked to an action: This is for example the case for the trophy icon of
the survey module. An exception can hence be thrown if the user clicks on
such button.

To solve the issue, we will add the 'disabled' property support for the
buttons and we will add that property to the buttons that do not have
an action. With this property, the script will bind no listener to the
button and it will hence not call the listener causing the error.

task-2612033

closes odoo/odoo#75096

X-original-commit: c698d589e7dfa6fe3df8b4014fe30627693e9043
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-13 15:34:46 +00:00
Swapnesh Shah d73c841abf [IMP] survey: make error message required when validation is enabled
Before this commit *Validation Error message* was not required for questions
with *Validate Required*. This leads to having `False` displayed if
*Validation Error message* is empty.

With this commit we make *Validation Error message* required for these types
of questions which requires validation. Indeed it makes no sense to required
a validation but having no message explaning why it failed.

closes odoo/odoo#58083

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-19 08:34:32 +00:00
Elisabeth Dickinson 840dc8bcf4 [FIX] survey: fix certification for long names & uppercase
If a client's name was too long (over 30 char) and in uppercase, certificate's
layout was broken.
A condition has been put in place for names over 20 char and uppercase names.

It is a best effort fix, but it will not fix all cases...

opw-2561078

closes odoo/odoo#71994

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-29 16:05:52 +00:00
bit-odoo 800f9c499a [FW][FIX] mail, various: show only my activities shown through systray
Before this commit, suppose we have a scenario like below

  Task-A:
    Activity-1:
      name: Email ( Today )
      Assigned to: User-1
  Task-B:
    Activity-1:
      name: Email ( Today )
      assigned to: User-2
    Activity-2:
      name: Call ( Due in 3 Days )
      assigned to: User-1

When User-1 goes through the systray 'Today' filter shortcut he gets both
Task-A and Task-B in the list instead of only Task-A. Indeed currently
activities are not filtered based on current user with its deadlines.

However purpose of systray is to indicate activities current user has to
perform instead of global activities.

After this commit activities will be filtered based on deadlines as well as the
current user. In order to achieve this behavior we needed to pass a domain like
[
   ('activity_ids.date_deadline','=', fields.Date.today()),
   ('activity_ids.user_id','=', 1)
]

And for that purpose we introduced a non-stored compute field with a search
method.

Task ID-2438822
COM PR odoo/odoo#72219

X-original-commit: f4eaf4d8fb2f97240201104dcd4fc7e2674bce02
2021-06-21 07:51:00 +00:00
Aurélien Warnon 9c6c77bcc0 [IMP] survey: allow to force submit with CTRL in textareas
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

closes odoo/odoo#68310

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-20 09:43:34 +00:00
Aurélien Warnon 8b3c1b36b7 [IMP] survey: add a "performance per section" chart
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
2021-04-15 12:32:12 +00:00
dht-odoo 12469ef4d3 [IMP] various: improve the sequence of menu items
- Currently all menus are out of order in app switcher.
- For example, Sales app is 16 menu away from Accounting,
  Social Marketing app is 25 menu away from Email Marketing, etc.
  So, all menus should be reordered.

- This commit will reorder the menus of the app switcher in order to reduce
  the distance between correlated applications,
  and bring the most common apps upward.
- And in this commit we have left gap of 5 subsequent sequence for further new menus.

PR: #69984
TASK ID: 2513082

Related: odoo/enterprise#17989
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 05:54:18 +00:00
Simon Genin (ges) ecfe85db84 [REF] web: static/src/(img|fonts) => static/(img|fonts) 2021-04-29 07:34:40 +00:00
David Beguin a888b8ee4a [IMP] survey: allow host to go to previous question in session
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

closes odoo/odoo#59659

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-09 11:47:20 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Julien MougenotandSimon Genin ebe86f5ca5 [REF] web,*: Flatten _assets_helpers
Before this commit, the asset bundle "_assets_helpers" was the only
bundle using a "t-raw" directive to insert assets in between other asset
calls.

Now _assets_helpers only contains the assets called before the t-raw
directive, and the second part (1 file actually) has been added after
every call of the bundle.

This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:17 +02:00
Patrick Hoste 2bb1f33155 [IMP] survey: display no question message for live session
PURPOSE

Before this commit, the survey host had no indication that his survey
has no questions. After this commit, he will be displayed with that
indication.
Before this commit, someone who took the survey had a message implying
him to modify the survey to add questions. After this commit the message
will say 'No question yet, come back later'.

LINKS

Task ID : 2456372
PR : odoo/odoo#68231

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-24 08:32:27 +00:00
Elisabeth Dickinson 7321ec0deb [IMP] survey: fixes certification layout, adding dpi and removing width and height in css 2021-03-23 10:08:58 +00:00
Dharmraj Jhala 9e4c8d61ea [IMP] base, survey: add option to enable smart-shnking
This commit adds a boolean field `disable_shrinking` in model
`report.paperformat`, which, if set to True, will add one
argument `--disable-smart-shrinking` in commands that prevents
the pdf shrinking. See issue[1] for more information.

This options is utilized for printing survey certificaiton.

issue[1] - https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3226

taskID-2483393
2021-03-23 10:08:58 +00:00
Lavish Chhatwani 45eb2b397f [IMP] survey: display title on certification preview
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
2021-03-03 16:16:00 +00:00
Dharmraj Jhala 45b448af99 [IMP] survey: display certification number based on ID
This commit displays dynamic certification number based on the ID of
certification record for both modern and classic layouts. It consists in
minimum 10 digits. It means that if the ID of the record is 5 it is displayed
as 0000000005.

Task ID-2341847
COM PR odoo/odoo#66028
2021-03-03 16:14:57 +00:00
Elisabeth DickinsonandDharmrajsinh Jhala ae4435af84 [REF] survey: implement new certificate templates
Improve certification templates and make them more aligned with current
state of the art certifications.

Task ID-2341847
COM PR odoo/odoo#66028

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Dharmrajsinh Jhala <dja@odoo.com>
2021-03-03 16:13:20 +00:00
Adrien Dieudonne 0aa8a2be7f [FIX] survey: align Survey Time Limit checkboxes on mobile
Steps to reproduce:
- Go to Survey
- Click on Create
- Go to the "Options" tab and see
1) "Survey Time Limit" Field in "Questions"
2) "Attempts Limit" after clicking on "Login Required"

Related task-ID: 1929043
2021-02-16 09:41:12 +00:00
Dharmraj Jhala f8738b70f4 [IMP] {hr_recruitment_,website_slides_}survey: add 'user_id' field
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
2021-02-10 17:03:59 +00:00
ijas ahammed 3010751e95 [IMP] {hr_recruitment_,website_slides_}survey: remove 'state' field
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
2021-02-10 17:03:03 +00:00
Michael Mattiello (mcm) 785b304876 [IMP] *: reduce shift in form views (xml)
* account, analytic, calendar, coupon, crm, crm_iap_lead_website,
  delivery, digest, event, event_crm, fleet, gamification, hr,
  hr_expense, hr_skills, im_livechat, lunch, mail, maintenance,
  mass_mailing, membership, mrp, point_of_sale, pos_mercury, product,
  purchase, purchase_requisition, sale_management, sales_team, sms,
  stock, stock_landed_costs, survey, website_crm_partner_assign,
  website_event_exhibitor, website_event_track, website_forum,
  website_slides, base

This commit removes oe_edit_only labels and adds placeholder
on fields in form views from a lot of apps to minimize the
shift when switching mode.

task 2330101
2021-02-02 12:40:22 +00:00
Dharmraj Jhala 637a68a46e [IMP] survey: allow to duplicate survey with badge
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
2021-01-04 15:10:11 +00:00
Benoit Socias 20141a0b91 [FIX] various: not translate the close icon of notifications
Same change in several areas where translations existed:
- website editor notification popup
- elearning share popup
- forum remediation filter popup
- event registration attendees popup
- portal rating popup
- stripe payment error popup
And many other locations where there were no translations yet
"&times;" has been replaced by its UTF8 character.
Also introduced aria-label where missing.

Before this commit the close icon was included in translated resources.
For example, in Spanish the "&times;" had been turned into "&veces;"
thus not rendering an icon anymore

After this commit the close icon is not a translated text anymore and
remains an icon across all languages

https://github.com/odoo/odoo/pull/60186
task-2312878

closes odoo/odoo#62250

X-original-commit: 9896af94ebc887d98ccf44e6568ef7eeb5a27172
Related: odoo/enterprise#14937
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-24 15:59:43 +00:00
Priyanka Kakadiya 94a6d8d7c9 [IMP] survey: improve UX of survey session code page
This commit improves the UX of the page responsible for joining live
quiz session. Few of the improvements are

  - Increase size of the input tag related to code
  - Display proper error message based on type of error
  - Move the error message below the code input
  - Improve few strings

Along with that, this commit also interchanges the position of
'Add a question' and 'Add a section' options question tabs
of the survey form view.

Task ID-2345907
closes #59060

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-16 10:10:43 +00:00
Martin Trigaux c59c10f1bc [FIX] *: correct typos and bad English
Courtesy of translators
Reexport .pot of modified modules

closes odoo/odoo#61010

X-original-commit: 62a18bdb372e234107fd2099a2df5f9e3a442c96
Related: odoo/enterprise#14489
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-29 19:23:41 +00:00
David Beguin 851e68ef40 [FIX-IMP] survey: add check on master tab
As survey session only works correctly when current tab is the master tab
on the bus, an error message is shown to user when this is not the case.

The user should close all other tabs on the same hostname before taking
the survey.

Task ID: 2345468

closes odoo/odoo#58989

X-original-commit: d5a1c104278e942f7fe332457c622a51dd647cfc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-02 12:12:07 +00:00