Purpose
=======
Currently the user interface let you specify several correct answers
per quiz question. But when you save the course, you get a notification
error. As those are simple quizzes, it might be interesting to simply
allow multiple answers.
Specifications
==============
Allow questions with multiple correct answers.
Back-end views: improve feedback when user forget to set at least one correct
answer and one incorrect answer per question.
Task-3366803
closesodoo/odoo#127065
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
This commit moves the ZoomOdoo library out of the web module and the
backend bundle (through the common bundle) to the website module (as
it's used by it and its dependent modules).
Part-of: odoo/odoo#130875
We make sure to have courses with a huge number of
attendees w/r to partners count.
Task-3463533
closesodoo/odoo#132374
X-original-commit: abd040a1084d462167d13cb071b4faf8439112f0
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
before this commit, _rec_name was not added for
slide.channel.partner
after this commit, _rec_name is added
closesodoo/odoo#123800
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The goal of this commit is to convert a bunch of legacy dialogs into owl dialogs.
closesodoo/odoo#131278
Task-id: 3453920
Related: odoo/enterprise#45484
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit removes the legacy service classes:
- AbstractService
- AjaxService
- AbstractStorageService
- LocalStorageService,
- SessionStorageService
Only AjaxService was still used as a service so it is moves in the
"common_env" file.
task 3439226
closesodoo/odoo#131683
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.
Part of task~3443861
Part-of: odoo/odoo#130467
This commit removes the qweb.render method, instead it will use the owl
render engine (renderToString or renderToElement).
Part of task~3443861
Part-of: odoo/odoo#130467
As all the templates are now imported in the owl app, the templates must
comply to owl.
t-key is mandatory when using a t-foreach
Part of task~3443861
Part-of: odoo/odoo#130467
Before this commit, only templates with owl=1 were added to the owl app.
Now, all templates are added to the owl app, and none of the templates
is added to qweb.
Part of task~3443861
Part-of: odoo/odoo#130467
Improve gettext to directly handle value injection within translations,
removing the need for sprintf.
closesodoo/odoo#123932
Related: odoo/enterprise#45370
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
In this commit, _t import from import { _t } from
"@web/legacy/js/services/core" and from
web/static/src/legacy/js/core/translation.js are replaced by
@web/core/l10n/translation.js.
task-3292454
closesodoo/odoo#130865
Related: odoo/enterprise#45270
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Bug to reproduce
----------------
- Log in as admin
- Go to the frontend page of a course
- Click on 'Add Section'
- Fill the form (name input)
- Press 'Enter' or click on save button x times
x sections with the same name will be created
Specifications
--------------
Prevent the 'Add section' form being submitted multiple times in a row.
task-3432418
closesodoo/odoo#131107
X-original-commit: a91a60b4be5b2f606d20fbe574625b85e43407f6
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Add a slide icon class field to prevent computing
the fa-class icon from the slide type in the template
everytime we need it.
Also, using a template wasn't suitable anymore as we
may need the icon outside of its own <i> tag
(see slide_sidebar_done_button).
Task-3378180
closesodoo/odoo#125859
Related: odoo/upgrade#4802
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit removes legacy patch/unpatch functions and adapts their use
by using the modern patch. There was also a custom patch function used
in tests which has been replaced too.
closesodoo/odoo#130867
Related: odoo/design-themes#685
Related: odoo/enterprise#45271
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
None of the main methods provided by this plugin were stil used; only
the internal method `enable()`.
This commit replaces these calls by toggling the `disabled` HTML
attribute.
closesodoo/odoo#130817
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Note: the "event_tour" stil has step targetting the .daterangepicker
selector... but as this tour is broken since (at least) 14.0, its fix
will be tackled in another PR.
closesodoo/odoo#129993
Related: odoo/enterprise#44742
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit moves the smooth scroll on drag helper from web to
web_editor, which allows us to move it from frontend and common
assets to web_editor.assets_legacy_wysiwyg which is only loaded
in the website editor, the only place where it is used.
Note that it uses legacy Class and mixins, so it still needs to be
converted to the modern codebase, alongside editor snippets.
Part of task~3439226
closesodoo/odoo#130813
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Mainly used for Internet Explorer support (cf. placeholder attribute is
supported since IE 10).
We are in 2023...
closesodoo/odoo#130692
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit removes the legacy implementations of Domain, Context
and the pyjs library. All of them exist in the new codebase, and
the few pieces of code that were still using the legacy ones have
been adapted.
Part of task~3439226
closesodoo/odoo#130647
Related: odoo/enterprise#45129
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Purpose
=======
Fix the traceback which was appearing when toggling
as done the content in the course template.
Specification
=============
The traceback happened because when all the content in the
section has been completed, we want to collapse the next section
automatically. However in this view the sections aren't
collapsable which resulted in calling methods on null HTML elements.
Fixing this by checking if HTML elements exists before trying to
collapse the next section.
Task-3449558
closesodoo/odoo#130633
X-original-commit: 51f82b306ed12dc2c8e32d2a0bd3052f8eed5d2a
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
When finishing (and succeeding) a certification in the e-learning module, you
can 'share' the content of the course by email.
But the "Send Email" button is unresponsive.
This is caused by having nested `<form>` tags: the one of the share modal is
inside the main survey form element.
To resolve this issue, we turn the `<form>` tag into a `<div>` tag in the
sharing template, as it does not need to be a form since it's never submitted.
Indeed, the sharing request is sent through attaching an event handler on the
"Send Email" button which still works fine after our tag replacement.
Note that this fix requires updating the module, but there is no (easy) way to
fix it otherwise, and we consider it acceptable as the impact is pretty low.
In addition to that, we also need to add a survey form JS override to correctly
attach the "ShareMail" widget when the screen is loaded to the "finished" page.
Indeed, as the survey form loads and replaces its content in AJAX rather than
fully reloading the page, we need to watch for the screen refresh and then
manually attach the widget so that the button handler is functional.
During FW to 16.4, we also fixed a small oversight of:
odoo/odoo@e0257347a7
Where we did not correctly add the "email_sharing" parameter when sharing the
certification content in the success screen.
Task-3360175
closesodoo/odoo#130613
X-original-commit: 337762b864d7b06abd7d1622083c5f00d7c7e7f7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.
task 3410198
[1]: 19ea1ac08043e22a811630968e44715cc3bfc495
Part-of: odoo/odoo#125716
As steps are encapsuled in an arrow function from
69a5d8e3ce47238 for steps tour definition to avoid
direct Markup(_t()) interpretation, the same is done
for registerWebsitePreviewTour() of
"odoo/addons/website/static/src/js/tours/tour_utils.js"
in this commit.
This is done in anticipation of the use of
_t() (import from @web/core/l10n/translation) with
registerWebsitePreviewTour().
task-3292454
closesodoo/odoo#130248
Related: odoo/design-themes#678
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Steps to reproduce:
- Install `website_slides` module
- Create a course and add a slide of type `Article`
- Go to frontend and edit the slide
- Add a text element and edit conditional visibility
(e.g. visible only if user logged in)
- Save and open the slide in fullscreen mode (with any logged user)
Issue:
The text block is missing.
Cause:
The slide is rendered in lazy load after that the code that unhide
conditional elements is already executed (on event `DOMContentLoaded`)
Solution:
Extract the concerned code so it can be called and re-executed after
the slide is rendered also in fullscreen.
opw-3225444
closesodoo/odoo#129646
X-original-commit: 553702c99cbd90edfb509ca9e7ab0c99c73a96e6
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
This commit fixes a really old grammar error in the help message of the
message_needaction_counter field.
Before this commit: “Number of messages which requires an action”
After: “Number of messages requiring action”
The subject of “require” is “messages”, which is third-person plural, so
it can't take the -s suffix.
closesodoo/odoo#129468
X-original-commit: 0d10cfeaa56d5df23df05f436d353978043f4a71
Related: odoo/enterprise#44509
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This commit adapts the code in addons w.r.t. the introduction of
the RelationalModel.
Main changes that were requested are:
- record datapoints no longer always have an "id" key in their
data (they still do if the id field is in the view), so we use
record.resId instead
- the new model is based on fined-grained reactivity, so several
components that previously relied on onWillUpdateProps to update
their internal state no longer worked. Typically, using the hook
"observeRecord" is the way to go now.
- specialdata are no longer handled in the model, so the components
needing specialData can use the hook "useSpecialData"
- more generally, all overrides of models (RelationalModel or
KanbanModel) needed to be reworked.
Part of task~3179751
Part-of: odoo/odoo#114024
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
When the user adds the "Title" or "Certificate" in a large number of
characters, the content goes beyond the window.
Technical:
By using this class it applies width 100%, which resolves the issue.
Now, the content stays within the sheet.
Task-3368902
closesodoo/odoo#129014
X-original-commit: 44720aa6e7080ce849af329d8c92681489e093fb
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.
task-3370463
closesodoo/odoo#127469
Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.
In this commit,
the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.
Example :
registry.category("web_tour.tours").add("example", {
test: true,
steps: () => [
{...},
{...},
],
});
task-3292454
closesodoo/odoo#124157
Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
The goal of this commit is to remove all dependency to legacy in the
wysiwyg because the wysiwyg has to be loaded on a lot of form view
(through the html_field).
To remove the dependencies, all the legacy widget that the wysiwyg
uses had to be converted to owl. In order to finish the PR faster,
only a partial conversion of the widgets is done, changing only the
part of the code that was necessary for it to work instead of
rewriting the whole widget from scratch. Another pass should be done
to convert all those widgets to fully embrace the owl paradigm.
task-3175256
Part-of: odoo/odoo#118966
Before this commit: Body content is the same as tmeplate
After: Body content is the same as the template
*: hr_recruitement, sale, survey, website_slides
closesodoo/odoo#128953
X-original-commit: 388e340a52fd5775c1702f8952a1e959fa5cef48
Related: odoo/enterprise#44309
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
When user archive a slide from a course and try to access route
'/slides/embed/<int:slide_id>' of that particular slide, user get the error.
steps to reproduce:
1. Go to Website and click on courses menu.
2. Open a course and archive a slide in it.
3. Then go to '/slides/embed/<int:slide_id>' route.
4. Access that particular slide that you have archived in route.
5. The error will occur.
Applying this commit will fix this issue.
sentry-4025579653
closesodoo/odoo#128797
X-original-commit: c097112109fb2de003242bda89e10e656236b774
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
luxon and moment are both used in the solution, but
these two libraries facilitate the manipulation of dates.
It was decided to replace all uses of moment with
luxon so we can then remove moment.js from the
code and lighten the assets.
task-3391739
closesodoo/odoo#127406
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>