PURPOSE
Fix the 'multi' behavior when sending completion emails for slide.channels.
SPECS
There was a typo in the 'slide.channel#_send_completed_mail' method that
prevented it from correctly working in "multi" mode.
A new test was introduced to ensure the fix is working.
LINKS
Task 2170708
closesodoo/odoo#61004
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit when searching channels based on tags URLs were generated
like `/slides/all?tags=%5B4%5D`. This is not very clean, especially when
people share links.
In this commit we move to a slug-based URLs generation and support. URLs now
look like `/slides/all/tag/basics-1,gardening-2` which is more readable and
user friendly.
Support of all tags is maintained: `/slides/all?tags=%5B4%5D` still work
and display the same as `/slides/all/tag/basics-1,gardening-2` to ensure
links still work after applying this patch.
Along with this improvement this commit also improves the behavior of tags
for bot indexation. This is inspired by website_blog[1].
Task ID-2267840
Closes#53621
[1] - https://github.com/odoo/odoo/commit/0f2cada32319b3910d6ace6d412cfa94a646c9c7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus
WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:
When saving, a read is called. By default, read has
bin_size to true to avoid performances issues.
It will return the image size instead of the content
it may lead to image dissapearing or "Incorrect padding" error
HOW:
find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
git checkout -- addons/base_setup/views/res_config_settings_views.xml
---
PR for General Settings: https://github.com/odoo/odoo/pull/47297
opw-2346644
closesodoo/odoo#61215
X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
This commit makes a small adjustment to the course view to hide the responsible
label in the course description if none is set.
As this field is not required on the slide.channel model, it's not necessary to
show a useless label when it's not set.
Task 2368573
closesodoo/odoo#60611
X-original-commit: 7114e13736d41f2350b14367704bf14c23cf9c0d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
This commit fixes a small issue with the modal displayed when the user wants to
manage his subscription to a course.
When pressing the "Save" button, if no modification was made, the modal would
not close and nothing would happen (which seems strange on a user POV).
Now the modal correctly destroys itself and closes.
Task 2363028
closesodoo/odoo#60507
X-original-commit: 32d0b1086b5db6c58c1e2891d8d77fafb9482de9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
We have a new feature that if the course is private, and attendee make the
request to access the course it will create an activity for 'course responsible'.
Currently, after accepting the invitation request from the new user, it is still
not considered the user as an attendee and not displaying like 'You're enrolled'
to the respective users
After this commit:
The features of access invitation on courses will be workable.
Task-2328389
closesodoo/odoo#60135
X-original-commit: becf051f38fcf08d4a0aea758cb2758ad0f25bc3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since a refactoring of the handling of the color system and the way the text
muted is handled, the text-muted isn't visible on the full-screen mode of a
course. That is becuase text-muted is based on the font color set for the body,
which in this case is quite similar to the background of left panel in
full-screen course content.
This commit fixes the issue by using `text-600` class that is suited for this
scenario (the background color is fixed here irrespective of the color-palette,
and so should be muted text-color) instead of `text-muted` for the left panel
of full-screen course content.
taskId - 2346013
closes#59390closesodoo/odoo#59970
X-original-commit: 7f7f9c6c9165fc6697e90ed6616466d9684e28f2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Issue
- Install "Elearning" module
- Activate "Drive" credidentials in settings
- Go to any course and edit it.
- In "Content" tab, click on "Add Content"
- Select `Video` as 'Type'
- Copy/Paste the Google Drive video link in "Document URL" field
- Wait for other field to be computed then "Save & Close"
- Save the course
- Go to the website to watch this new content
Youtube error message
Cause
'mime_type' field is readonly. When saving the course (slide.channel),
the slide is not saved yet, and therefore drop the 'mime_type' value.
When generating the `embed url`, it verify if a mime_type is set: if not,
it will generate an iframe with youtube.com as domain, else,
a drive.google.com domain.
Solution
Add `force_save="1"` on `mime_type` field.
opw-2294344
closesodoo/odoo#59917
X-original-commit: 987b9bf408cf5ba2deded7e2015caa6faeb65a87
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
- Prior to this commit, slide content of type document or presentation is
having src as '/slides/embed' and that controller tries to set slide as
viewed. Along with this, for few slide types (including document and
presentation) and for logged in user, it will try to set slide as completed
once slide rendering is done with help of method `_setCompleted`, without
waiting for the iframe to be loaded. This means, the controller called from
the src of iFrame and the above method both tries to update same 'slide_slide'
table at the same time, resulting into concurrency error.
- This commit fixes the issue by marking the slide as completed (with help
of method `_setCompleted`) only after the iFrame is loaded, avoiding the
concurrent updation of 'slide.slide' table.
TaskID 2265863
Closes https://github.com/odoo/odoo/pull/52918closesodoo/odoo#59391
X-original-commit: c5f406c8cbf43c56939cee054f9b911fe3933b3b
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>
*blog, forum, slides
Based on https://github.com/odoo/odoo/pull/48552#discussion_r440061218 suggestion
Add a new method 'increment_skip_lock' in tools.sql to allow to easily
increment a specific field of 1 if the record is not locked.
The method return boolean if at least 1 record has been incremented.
closesodoo/odoo#58765
X-original-commit: d92e61e89f468c2db2fbd68b2f0d6b36c77f1065
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Bug
===
You can enter in a fullscreen mode in the frontend, of the slide channel.
In this view, the default website header should not be visible.
To do that, we play with z-index, but since 0f2cab4aeb ,
the z-index of the website header has been changed without changing the z-index
of the fullscreen view.
Task-2345016
closesodoo/odoo#58483
X-original-commit: 8d35540df6d21af6fe716f73aefa37bfb66c7ac2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since a recent refactoring[1] is merged, few compute methods are being
called at record creation, and throws traceback because of newID.
This commit fixes the traceback by improving the compute methods and
thus enable users to create records of slide contents and forums.
Note - compute fields should be assigned a value, and so we update
the recordset with default values while creation. See below PR for
more information.
[1] - https://github.com/odoo/odoo/pull/55995
Task - 2325605
closesodoo/odoo#58196
X-original-commit: a677859a03c86bf6ac791c31f52ce8609bcba594
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Mainly transifex issues but also some errors found through 'grep' checks.
Fix typos and obscure english strings in xml contents, fields strings/helps, some docstrings, ...
ensuring correct translations base (and fallback when translations isn't available).
closesodoo/odoo#57276
X-original-commit: 4214f05d454bca2b60fda3a288d529c098e84f77
Related: odoo/enterprise#13053
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
- Before this commit, deleting slide category from frontend was not possible
- After this commit, there is a 'trash' icon on the category while hovering
on it (just like slides), clicking which will delete that category and
reload the page to re-arragne the content. If there are slides under the
category being deleted, they will be uncategorized and move to the top.
Task: 2093671
Closes#49646
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Clean code. Be more performance oriented.
SPECIFICATIONS
Improvements applied in this commit
* not all() --> any(not) for earlier returns;
* all([generator]) --> all(generator) to avoid unnecessary list casting.
This code construct is better managed by all;
This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.
LINKS
Task ID-2328619
closesodoo/odoo#56810
X-original-commit: 1cc6bb1231401ea7f501d2f5b5e9641ec8734850
Related: odoo/enterprise#12802
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
PURPOSE
After this commit, an email will be sent to congratulate the attendee
for the completion of a course.
SPECIFICATION
Adds a new 'Completion Email' template field in the slide.channel model
that will be sent automatically after an attendee completes a course.
LINKS
Task ID : 2216352
PR : #49592
PURPOSE
Before this commit, it was possible to send an email to all attendees only.
After this commit, it will be possible to send an email to attendees that
completed the course.
SPECIFICATION
Adds a searchable o2m field in the res.partner model to find all the completed
courses linked to that partner.
LINKS
Task ID : 2216352
PR : #49592
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.*
The purpose of this task is to improve the UI of the 'Apps', by
improving the clarity of the kanban, sequencing the apps and
simplifying the app categories in the searchpanel
So in this commit, Added the new sequences for ir.module.module
and ir.module.category records.
TaskID: 2240257
Related Enterprise: https://github.com/odoo/enterprise/pull/12413Closes: #55907
PURPOSE
Archiving a course should also archive its content, and unpublish it as it
should not be accessible from outside. Improve archive / publish management
between a course and its slides.
SPECIFICATIONS
Show the content of an archived course having archived slides. When slides and
course are archived its content should still be displayed. This is done using
an active test in context of field.
Propagate channel archive to content. Also unpublish archived slides.
LINKS
Continuity/IMP of task-2170708
Task-2225598
closesodoo/odoo#52233
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
*: web_editor, website_blog
Unfortunately, this feature revealed a new batch of flaws in the
editor widgets system so some hacks were made to make it work. We will
always have the time to improve the pure technical side later.
This commit also separates the notion of color filter from the notion
of parallax. A color filter can now be applied independantly, when
there is either a background image or a background video. Applying a
color filter on top of a background video is actually a new feature.
Applying a color filter on top of a background image is actually now
achievable by two different ways: this new color filter layer or by
applying the color transformation on the image itself via the related
option. Depending on the user case, both could make sense at the same
time, but more importantly: having a CSS color filter is useful for
using those for default Odoo content (e.g. like the current contact us
page where we use a cover banner with an image with a black filter on
top of it: doing that without CSS color filter would mean to alter the
image directly which would not be ok when the user changes the image).
Also, sometimes you want the unfiltered image on a page and the exact
same one but filtered on another (for example: forum images).
Note: this commit also "fixes" an issue: the optimization feature for
images when parallax was enabled was not available before.
Part of https://github.com/odoo/odoo/pull/47313
task-46147
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
PURPOSE
Improve onboarding and user experience and course frontend
SPECIFICATIONS
Overall improvements and onboarding :
* new and improved default images for both course types;
* preview / free preview badge update;
* copy writing and spacing update;
* allow to specifically choose a slide to promote. Display promoted slide is
not optional anymore as configured in backend;
* display a sample of lessons if no lesson in a course;
LINKS
Task ID-2241513
PR #55698
PURPOSE
Improve onboarding and user experience of eLearning homepage
SPECIFICATIONS
Overall improvements and onboarding :
* remove "heroes" banner (can be customized);
* improve copywriting;
* hide achievements if not logged;
* hide void sections (do not display "no achievements currently");
* remove button on top "pick a course", can be done with a customization
id necessary;
LINKS
Task ID-2241513
PR #55698
PURPOSE
Change the display of the button to open the composer from btn-primary to
btn-link.
SPECIFICATIONS
In order to ease integration of popup composer rating widget, let us allow
to customize classes given to the button triggering it. In slides we want
specifically it to be a link, not a button.
LINKS
Task ID-2241513
PR #55698
PURPOSE
Remove an unused template that was never called. Let us clean it.
LINKS
Task ID-2241513 (eLearning onboarding and testing)
PR #55567closesodoo/odoo#55583
X-original-commit: 0f160586afdf139781049fd95c8c56e80c5522da
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Issue
Traceback raised in case no link provided when content type
is a video.
Solution
Format url only if provided.
Note: also fix issue with scheme (embedCode src could start with //)
Related fix : https://github.com/odoo/odoo/pull/54536
opw-2294344
closesodoo/odoo#55079
X-original-commit: 49a18eec21bad3d193804a3aa630e453b85318e9
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Issue
- Install "eLearning" app
- Add video to course
- Open video course in fullscreen mode
1. Google drive error message
2. Video still loading
Cause
1. The base google drive video url has no params,
and when adding params, missing the "?" before them.
2. 'autoplay' param make crash the launcher.
Solution
1. Use URL javascript library to append params.
2. Let "autoplay" param only for non google drive video.
opw-2294344
closesodoo/odoo#54793
X-original-commit: 6da17c3ee1e0c63b0cace60da2f98cfc4fe8ac57
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
The linter would miss / fail to warn on injection of *local variables*
in some cases.
Try to improve it to be stricter and more reliable, after discussion
with odo, sql which is "correctly" dynamic should use psycopg2's sql
package in order to bypass the linter (bonus: it should also properly
escape & quote identifiers).
closesodoo/odoo#53938
Related: odoo/enterprise#11718
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- Seta a value for the `ir.config_parameter` `mail.catchall.domain`
- Enroll user A to a course
- Add new content to the course
- Publish it
=> an email is sent to the users enrolled
- Reply to the email
The reply is considered as a review of the course.
It is not intended that users reply to such email; they are 'one-way'
notifications.
A solution is to be able to set the `reply_to` field on the mail
template. This way, it's possible to set it to a `noreply` value.
opw-2290521
closesodoo/odoo#54281
X-original-commit: 7ffc300e7c857bf743d7ab25631f9ee02419dea1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Issue
- Create a content in a course with type "web page"
- Access it frontend and add a "text - image" block, edit the image as a video - save
- The video is displayed correctly
- Go into full-screen
The video is not displayed at all.
Cause
The content is added after the page and page widgets are started
Solution
Trigger the widgets start method
OPW-2290233
closesodoo/odoo#54190
X-original-commit: 0f93240e4979479ab281ca49e8703b325c4b83f0
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Ensure deterministic sorting for slides with the same sequence.
opw-2283154
closesodoo/odoo#54008
X-original-commit: 46bd51dc5f7b674409beac2557cbd19ec001944b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.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>
This commit sets attribute sample="1" in a bunch of list and
kanban views, to enable the new sample data feature when views are
empty.
Task 2232801
X-original-commit: 5471309b35619f307242c2704c7681ba63d2be42
Issue
- Install website slides
- Create a slide with document url =
a youtube video URL with params like ?rel=0
- Check it on the website with debugger
The iframe url doesn't have ?rel=0
Cause
We only take the video ID and pass it
to a predefined string. We add light
theme params too.
Solution
Split the given url in order to
get the params and pass it to
the predefined string.
OPW-2275928
closesodoo/odoo#53334
X-original-commit: 5e8fcd3391525192f462cc44acd84d3badb4f132
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Wrong usage of self in for loops makes some apparently multi-friendly
methods not work correctly when called with a recordset of len > 1.
This commit replaces those references by the correct unique record
reference which should be used at this iteration of the loop, avoiding
potential exceptions or wrong behavior in the concerned methods.
closesodoo/odoo#53320
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>