PURPOSE
This commit adds some small UI improvements to the e-learning views.
All those small changes are meant to improve the general user experience when
adding content to a course.
DETAILED SPECS
- Change some placeholders / labels
- Inform the end-user that he can edit his 'webpage' slide using the editor
- Inform the end-user that he can add questions to his 'quiz' slide using the
'Quiz' tab in the backend form view
- Do not update from slide metadata if field value is already set
- Do not allow previews for certifications
- "Allow Download" of slide content is now False by default
As it was nice to have for "Documentation" courses but does not really make
sense for "Training" ones.
- Having a duplicate video id is now informative on the frontend and not
blocking as before (it was allowed in the backend form anyway).
- Show the video title in the frontend preview
Task-2510174
Part-of: odoo/odoo#71477
PURPOSE
Globally refactor the way we handle external content (YouTube videos,
Google Drive documents, ...) in the course slides.
This includes both technical changes (new computed fields, rename, ...) as well
as visual changes on the form views that allow introducing new content, both in
the backend (slide.slide form view) and in the frontend (course main website
page).
SPECS
TECHNICAL REFACTOR
1. Rework the "url" field
This field was used without any distinction for videos, regular documents and
images, leading to a big confusion both technically and visually.
The urls are now split in separate fields (video_url, document_google_url and
image_google_url), based on the type of slide.
Those fields are implemented as 'related' to the stored 'url' field to avoid
extra storage.
This change globally increases the readability and usability in the code, and
also allows for clear labels on the various views.
1b. Rework the "binary_content" field
The same way as for the 'url' field, the 'binary_content' field has been split
into 2 related fields ('document_binary_content' and 'image_binary_content').
This allows for more readability and also helps in the form view to limit the
file selection to the supported file types.
2. Remove the "document_id" stored field
This field did not have to be stored since it can "easily" be inferred from the
video/document URL with some regex work.
3. Remove the "mime_type" field
This field's value was only determined by an external call to the Google Drive
API. It was inconsistent because not set for manually uploaded document and was
used for some strange checks that seemed to work but did not make much sense.
(e.g: used to make the difference between a Google Drive video and a YouTube
video??).
It has been replaced by a "document_type" field, which is always 'pdf' for
local files (only type we support) and inferred from the mimeType returned by
Google Drive metadata for external documents.
This allows, for instance, to show pretty icons next to every slide based on
their type, "sheet" files (Excel, Google Sheet, ...) share the same icons, the
same principle is applied to "doc" files (Word, OpenOffice, Google Doc, ...)
and finally "slides" files (PowerPoint, Google Slides, ...).
4. Introduce several computed fields
Such as:
- video_source_type
- youtube_id
- google_drive_id
These fields are mostly inferred from the slide type and the related URL.
They are used to make clear checks in the code and ease readability, for
example when constructing the slide "embed code" to insert it in the frontend
full screen viewer.
5. Remove the "presentation" slide_type
The slide type "presentation" was some kind of very confusing type between
image and pdf. It was mostly relying on the fact that the content had a bigger
width than height ('landscape' display).
This lead to a lot of confusion both in the code base and in the various forms
allowing to introduce new content ("what should I choose? document or
presentation?").
In order to simplify everything, we completely removed the slide type
"presentation" and converted all the data that had this type and the various
code checks to the type "document" instead.
Meaning that we end up with the following slide types:
- Infographic - for images, local files + external links
- Web Page - local input only
- Document local files + external links
- Video - external only, YouTube or Google Drive links
- Quiz
FUNCTIONAL
Following the technical changes here above, we can improve the form view of the
slide.slide model as well as the website form that allows adding new content.
1. Slide form view
To make it clear where the source of the document comes from, we introduced a
"source_type" field that is either "local_file", used when uploading a file
from your computer, or "external", used when linking content from Google Drive.
The source_type selection appears when adding content of type "document" or
"infographic" and conditions the display of the file upload button or the
document_url field.
2. Adding content from the website
When adding content from the website, the user is now invited to select from
ALL the available slide type, meaning we added "Infographic" to the selection.
Before this change, if you wanted to link an image, you had to select the type
"presentation" (that has a PDF file as icon...) and then input an image file.
The JS then processed the file type to determine the slide type.
As this was slightly confusing for the end user, we decided to use the same
approach as the form view, meaning you FIRST select the type of slide you want
and THEN input the content as a local file or external link.
Since we now handle all types of documents when using an external Google Drive
link, the various screen and text helpers have been reworked accordingly.
3. Handle more types of slides with the new "slide_type" field
This commit also introduces a new "slide_type" field.
(Don't get confused, the previous "slide_type" field has been renamed to
"slide_category" in an earlier rename commit).
This slide_type is a refined slide_category:
- Videos are split into 'youtube_video' and 'google_drive_video'
- Documents are refined based on the file mime_type if it's external content
For example, if you link a Excel file, the slide_type will be 'sheet'.
If you link a Google Doc, the slide_type will be 'doc'
etc...
(Local documents are only PDFs since it's the only type we support for now)
This small change allows to include minor nice details into views, such as a
refined icon for each slide_type on the website.
LINKS
Task-2510174
UPG PR odoo/upgrade#2498
Part-of: odoo/odoo#71477
This commit simply applies the following renames in the slide.slide model:
- 'datas' is renamed into 'binary_content'
- 'slide_type' is renamed into 'slide_category'
This changes intend to ease the next bug refactoring of the website_slide
module content management.
There should be no functional changes applied in this commit.
Task-2510174
Part-of: odoo/odoo#71477
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
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
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
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
before this commit,
it was raising an error while try to preview the certificate
after this commit,
prevent the preview of certificate, as it is not possible to
set the preview of certificate
task- 2623276
closesodoo/odoo#78911
X-original-commit: 8c51d83855566cb21578f18ebf460cead484aed2
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
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
Currently markup-ification of the legacy notifications system
display the html content in notification layout for some of the
notification of document and planning from commit: https://github.com/odoo/enterprise/commit/ba44461fea337ed2e5adbdfa1e8eede00b036def
So here in this commit, we make the method `makeLegacyNotificationService`
always `_.escape(message)` and pass `messageIsHtml: true` to the owl
notifications system so notification with html content will be displayed
properly.
Task-2657391
closesodoo/odoo#78627
X-original-commit: 7ce6d8d70be79c9c626865598b898dce9a18b045
Related: odoo/enterprise#21782
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment
By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).
There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).
We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.
To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.
This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
(for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
in order to see only one at once
- a floating select input to switch visibility of a particular logical
branching
Task-27033
X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
Before this commit when user quick create a certification,
then it will create record in survey but not with certification
equals to True. Due to which it will be excluded from domain and
we will not able to find it in survey_id in elearning.
With this commit we pass certification equals to true and scoring_type
equals to scoring_without_answers in context of survey_id. So now,
it will be not excluded in domain('certificate', '=', True) in elearning.
Task Id: 2621296
closesodoo/odoo#75375
X-original-commit: 47894929591c7f46451242c1d0368094e2b3c295
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
This branch adds request.redirect on all requests.
In case of a front end request, we do an url_for to the location.
We removed redirect_with_hash that was only for retro compatibility
local_redirect has been renamed to redirect_query, and param keep_hash has been
removed and moved.
Default code for redirect is 303 now instead of 302.
Now redirect and redirect_query make local redirect by default, you need to
pass local=False to make external redirect.
All werkeug.utils.redirect has been replaced by request.redirect.
Http.redirect now use an http.Response type, and it become easy to add an
override like 'set_cookies' e.g.
Dispatch of a website.page return an http.response too, so we first need to
check if it is a cached version before to check if it is an Odoo Response.
Migrate your code:
http.redirect -> request.redirect(location, code, local)
http.local_redirect -> request.redirect_query(location, query, code, local)
http.redirect_with_hash -> request.redirect
Courtesy of odony for help and review ;)
closesodoo/odoo#72599
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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>
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
This commit enables eLearning users to share the channel linked to
certification they cleared directly from the result page.
Notes:
1 - We already have the option to share a certificate from the user info page
or from the slide page, and the same mechanism has been utilised here.
2 - With a recent commit[1], top padding was added to the modal opened on
website front-end to prevent modal overlapping the navbar. But it caused
a side effect on survey result page, where navbar is hidden. So we remove
this top padding on modal for the survey result page.
[1] - https://github.com/odoo/odoo/commit/6ef622772f7d0172553aca6dbce9eb71855460d7
taskId - 2337696
closesodoo/odoo#58104
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adapts the business code in which
class/module/function/method redefinition took place so that it no
longer happens and the pylint test passes.
Bug
===
In the user profile view, we can see the certifications of the current user.
If we click on the share button, we are redirected to the course instead
of opening the share modal.
Technical
=========
Since 1f52435966 we use an on-lick event to
redirect the user when he click on the card. We use the JS event instead
of an standard anchor because nested anchors are forbidden in HTML.
That cause an issue if we click on a child anchor and if we stay on the
same page (which is the case when we open a bootstrap modal) because the
on-click event will be triggered.
We can not just stop the click propagation otherwise the modal won't be
opened.
Also, as the bootstrap modal element (`website_slides.slide_share_modal`)
is inside the element with the on-click event, so, if we click anywhere
on the modal, we will be redirected...
So, the solution is to open manually the modal, to stop the click
propagation and to move the modal element.
Task-2337693
closesodoo/odoo#59545
X-original-commit: 2a63f98bd359907169d14539feaa99a1d83263f0
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Including demo data this time
closesodoo/odoo#58862
X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@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
Improve elearning backend usability and onboarding
SPECIFICATIONS
Improve layout of email send when invite. Do like a SO, add the join button
in the notification email and not in the composer itself. It required to
create a new notification layout specific to that invite wizard.
Improve channel form view: remove statistics as they are already displayed
in various places, add a stat button for content/visits, better display of
karma (split gain from karma-based access rules).
Automatically publish channel's product to avoid de-synchronization of publish
flags.
Remove unused channel_url field on wizard.
LINKS
Task ID-2241513
PR #55698
PURPOSE
Improve usability of course creation and management in frontend
SPECIFICATIONS
This commit improves various elements of the eLearning module:
* the create 'new course' dialog has been improved with examples and
improved placeholders;
* allow to create tags directly from course creation modal. Using the
add tag button after having created the course is not the only way of
managing tags anymore;
* the create 'new content' dialog has some explanations on the right side;
* add a flag indicating which content has already been viewed in
documentation;
* changes the text/color of some buttons;
LINKS
Task ID-2241513
PR #55698
Before this commit, the Start now button uses the first slide (a content
slide or a category slide). If the first slide was a category slide then
an error was raised.
Now, only content slides are used to start the survey.
opw-2265250
closesodoo/odoo#52309
X-original-commit: bbc84c5d03eae51b6edfe270da51087970db2227
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Purpose
=======
Before this commit, in the front end, you had to create a certification before
adding it to a course. This commit allows creation of certification in
front-end with pre-filled settings.
Functional Spec
===============
1. On a course, add content, type certification, you can choose an existing one
(normal flow) or create a new one in the dropdown by typing a new survey
name (new flow).
3. When submitting (Publish or save as draft), a certification survey, with
pre-filled settings is created and linked to the slide.
Pre-filled settings:
* One page per question
* Attempts limit : 1
* Time limit : no limit
* Scoring without answers
* Passing score : 70%
* Is Certification : True
* Email Template : Certification: Send by email
* Give Badge : False
4. After submit, the user stays on the Course Content.
5. A toaster is displayed in the top right saying:
Toaster's Title: Certification created
Content: Follow this link to add questions to your certification.
<a>Edit certification</a>
A website editor can select a certification (if available) for the creation of
a slide.
Task id: 1981399
PR #43577
Co-Authored-By: Florent Lejoly <fle@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Commit 90bf317c01 added read rights on survey for eLearning officers.
Reason is that they should be able to link surveys to slides, notably to create
certifications in eLearning.
However in backend eLearning officers cannot access any survey form view as
rights on sub models are not granted. We fix that by correctly giving a read
access on survey sub models to eLearning officers.
They are therefore able to read survey results and statistics. It makes sense
as they are linked to marketing teams. They have no modification rights as
those are limited to survey users / officers.
Notably
* have tools and helpers in a SurveyCase and let SurveyCommon bet the
one with data;
* remove unnecessary with_user, replaced by standard one;
* move all tools in SurveyCase to help reusing them;
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>
If you archive a certification while being member of the source you still
have access to the "Begin Certification" button. Indeed you can see the
certification as you have rights to do so (publisher, manager) but trying
the certification will crash as it is not allowed for archived slides.
Instead in archived mode the "Test Certification" button is displayed that
allow to make a test entry even for archived surveys.
closesodoo/odoo#47956
X-original-commit: 10abdf711ac7d0aee7d6eab4e30b08acd38eaa23
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
The current kanban view is messy. It is difficult to identify which
apps are installed or not. The user can completely miss a module
that might have interested him. A search panel would make things way
more readable.
closesodoo/odoo#44401
Taskid: 2181557
Related: odoo/enterprise#8144
Related: odoo/upgrade#879
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
RATIONALE
Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case
* using the template in the composer on a single record: it is displayed
in the rendered template in the composer, meaning people could change it.
This behavior is interesting as it allows to see the email content;
* using the template in the composer in mass mail mode: it is not displayed
as only the raw jinja is displayed. It is therefore not obvious that it
will be appended to the body of the mail. People could add it manually and
have 2 signatures as a result;
A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.
Behavior will therefore be
* use a template -> specify signature usage in it manually through jinja;
* do not use a template -> signature added in sent emails;
SPECIFICATIONS
Remove user_signature.
Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.
Quickly clean some signature integration.
LINKS
Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761
Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
PURPOSE
To have a better UX, the transition between questions in a survey should not
be done by loading another page, but by loading next questions in AJAX.
This will allow to fade out / fade in the next question and improve the user
experience, as well as prepare the work for the complete survey redesign.
SPECIFICATIONS
General
=======
This commit refactors the way the questions are loaded.
To go to next question(s), instead of redirecting to a new page containing
the next question(s), the submit process is loading the next question(s)
using ajax. The template of the question is prepared at server side and is
given in html string to the client that display the next question in a smooth
transition (fade in / fade out).
This commit includes also the start and the end screen of the survey inside
the survey form in order to perform smooth transition between start screen
and first question(s) and between last question(s) and end screen.
Only one master template (survey form) is now used to display every part of
the survey : start + questions + end screens.
The answer_done error is now handled by the _prepare_survey_data itself.
If the user wants to display an already_done survey, the returned template
is the end screen.
This commit handles page transition for the survey results. When submitting
survey, the survey result widget is initialized and attached to the survey
result section.
A new route has been added : /survey/begin/.
If the user arrives on start screen, the state is 'New'. Once the user clicks
on Start button, an rpc call is made to survey/begin that will call the
survey_prepare_data to render the first question page and set the state to
in_progress and the start_datetime of the answer.
Validation
==========
Add the validation of all types of questions directly in the frontend.
This allows to reduce the latency before the survey is validated and was
necessary to go along with our new fade out / fade in mechanism.
The client does not need to wait the validation answer from the server to
display validation error messages.
The current questions are only faded out if the frontend validation has passed.
The server still makes this validation before submitting answers and loading
next question(s) to avoid direct rpc calls that would mess up the answers.
Error messages are now displayed with a slide down transition, for a wonderful
wow effect !
Timer
=====
As the survey form works with ajax to display start screen, question(s) and
end page, the timer has to be started only after the start screen.
This commit display and start the timer only after start survey button is
clicked.
Breadcrumb
==========
As the survey form now works in ajax to display in same page start screen,
question(s) and end page screen, the breadcrumb has to be controlled not only
on page loading but also manually between transition from a screen to another.
To ease the breadcrumb management, breadcrumb is now a widget that will reload
a js template, mainly depending of the current page id.
The js form initialize or update this widget giving this new page id.
On breadcrumb item click, the widget triggers a onclick caught by the form
that calls the submit with the given target.
This commit handles page transition for the breadcrumb. When going forward or
backward (next or previous page), the breadcrumb activates, deactivates and
links elements are reinitialized depending of the target page.
LINKS
Task ID: 2152223
PR #41453
Co-authored-by: Aurélien Warnon <awa@odoo.com>
This commit prepares the complete redesign of survey.
Simple choice question type will only use the radio button display mode.
So the dropdown display mode is deleted.
Task ID: 2152223
PR #41453
Previously there was no way to view when a survey (specifically a
certification survey) was being used by a course from the survey
app. We handle 2 cases for when a survey is currently assigned to
a course:
1. A survey is assigned to 1 course => survey form stat button visible to bring user
directly to corresponding course form.
2. A survey is assigned to more than 1 course (unlikely, but currently possible) =>
survey form stat button visible to show user a list of corresponding courses where
each list entry can be clicked on to view corresponding course form.
Note: we do not cover viewing courses a survey was previously assigned to as this would
be currently be unreasonable to track.
closesodoo/odoo#42336
Task: 2153743
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>