Commit Graph
1191 Commits
Author SHA1 Message Date
laa 443b44c971 [IMP] website_slide: add toggle button achievement
Add an option to add the latest achievements in the right sidebar.

closes odoo/odoo#36870

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-13 13:05:31 +00:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Martin Trigaux 73e70673e7 [I18N] *: export saas-12.5 source terms
closes odoo/odoo#36853

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-13 11:38:37 +00:00
fja-odoo 424adb63e3 [IMP] gamification, *: remove KarmaError
* = stock, test_website, web, website_forum, website_slides, base

Replace KarmaError with AccessError and remove the related override made
on crash_manager and ir_http.

task-2069890

closes odoo/odoo#36655

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-12 13:49:02 +00:00
Christophe Simonis 5a273e74f0 [MERGE] forward port branch saas-12.4 up to fe59754c52
closes odoo/odoo#36721

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-13 13:32:51 +00:00
Lucas Lefevre 290341b455 [FIX] website_slides: still another fix of computed fields
This commit fixes 2 issues coming from the recent ORM changes: records are
new records in onchange and compute methods must assign a value for all records.

In an onchange method, self.ids is a list of integer (real records)
whereas self.id is a NewId (virtual record)

Here a result dict was built using the reals ids as keys but later NewIds
are used as keys. Solution is to use record._origin to access the real record.

Moreover, the two dicts `result` and `type_stats` are the same. Assigning one
into the other is useless.

Task 2067872 (eLearning internal testing)
PR #36756
2019-09-13 10:05:43 +00:00
Thibault Delavallée 0eec4d22a2 [FIX] website_slides: avoid admin being twice member of courses
Since admin is responsible of all created demo channels and then re-added
manually as member in demo data of slide.channel.partner he is actually
twice member of some channels. This commit fixes that by resetting its
membership status before adding membership demo data.

PR #36756
2019-09-13 10:05:43 +00:00
Thibault Delavallée 98f847be3a [FIX] website_{slides, profile}: fix display of not square user image
When having not square images for user avatar several issues appear

  * website_slides: heroes of the week banner is broken as circles are not
    circles anymore. They look more like UFOs or funny snowmen;
  * website_slides: my user status / leaderboard / achievements card display
    is broken as image may take much more width than planned;
  * website_slides: channel page view displays user avatar when having joined
    it, and it is broken;
  * website_profile: user avatars in top 3 of users karma ranking is broken.

In this commit we apply strict rules on width / height combined to an object
fit in order to always have a bioutifoul displayed circled image.

Task 2065425 (avatar ratio badly displayed)
PR #36756
2019-09-13 10:05:15 +00:00
Thibault Delavallée 477b73ed31 [FIX] website_slides: make content stat button redirection match counters
Course content counters count only published content while content stat button
redirects to all contents. Solution to this mismatch is to apply a search
filter on button action to display published ontent by default.

Also remove unnecessary action. Using a type="edit" seems sufficient, no need
to define a python method just for that purpose.

Task 2067324 (counters / action on content mismatch)
PR #36756
2019-09-13 10:05:15 +00:00
Thibault Delavallée c3b5f31307 [FIX][IMP] website_slides: move youtube dependent tour in its own tour and test
Contacting youtube API sometimes fails making falsy red runbot. In this commit
we remove video from member tour so that it tests the interface. Some demo
slides with youtube video are added in another course and new test is added
that crawls that channel.

Task 2066565

closes odoo/odoo#36697

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-11 12:39:26 +00:00
mcm-odoo 3e4b0f3200 [IMP] website_slides: improve slides backend views
This commit improves a bit the existing backend views of the elearning
app (notably propagating content and course labeling instead of slide and
channel) and adds a pivot view for model slide.slide.

FP feedback

Task 2066646
2019-09-11 09:16:26 +00:00
jbm-odoo 34038b7412 [FIX] website_slides: Fix kanban view with group by
id=2069603

closes odoo/odoo#36603

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-10 08:51:16 +00:00
Martin Trigaux 68c753af55 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#36559

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 08:58:33 +00:00
Odoo Translation Bot 0d51520083 [I18N] Update translation terms from Transifex 2019-09-08 01:29:12 +02:00
Thibault Delavallée a08845d2a3 [IMP] website_{rating, slides}: allow to manage attachments when updating reviews
PURPOSE

Allow to manage attachments when updating a frontend review.

SPECIFICATIONS

Currently when posting a review in eLearning or eCommerce one can attach
files to its review thanks for portal composer. Rating popup composer allow
to update its comment and rating. However this edit mode has two limitations.
It does not display attachments previously added and does not allow to add
attachments.

This commit fixes that by

  * giving attachment values to the composer, allowing its display by the
    composer display at startup;
  * allowing to give new attachments and properly handle them in slides
    route;

Uploaded and validated attachments cannot be removed by users. Indeed
message with attachments has probably already be sent to people and removing
attachments would lead to information loss.

LINKS

Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)
2019-09-04 11:41:59 +00:00
Christophe Simonis 51354fadb0 [MERGE] forward port branch saas-12.3 up to 50e571acf7
closes odoo/odoo#36491

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-11 09:39:33 +00:00
Odoo Translation Bot 71cc792c94 [I18N] Update translation terms from Transifex 2019-09-08 06:21:59 +02:00
Odoo Translation Bot 4af010bdec [I18N] Update translation terms from Transifex 2019-09-01 06:24:20 +02:00
Jorge Pinna Puissant 92990ad30e [FIX] i18n: missing Slovenian translation
Slovenian language, as many others languages, is not present in the
beta/master projects in Transifex.

For some reason, Transiflex removed all current translations, this was
already fixed in 12, but as there are not automatic forward-port for
translations, this is a manual forward-port.

opw-2060055

closes odoo/odoo#36374

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-03 11:32:39 +00:00
Odoo Translation Bot 156142caf2 [I18N] Update translation terms from Transifex 2019-08-25 06:21:10 +02:00
Lucas Perais (lpe) 42820c35db [FIX] website_slides: adapt youtube api widget to promise
Before this commit, the adaptation of Deferred to Promise was not well done
Hence, the change in video playing status was not handled correclty
i.e. When a video arrives to its end, the next slide or the questions should be displayed

After this commit, when a video is finished, the next slides is displayed

OPW 2052971

closes odoo/odoo#35863

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-20 13:55:48 +00:00
Odoo Online 19727047ce [I18N] Update translation terms from Transifex 2019-08-18 06:20:13 +02:00
Martin Trigaux 8be6470a82 [I18N] *: export saas-12.4 source terms 2019-08-13 11:53:38 +02:00
Christophe Simonis b2872e9bab [MERGE] forward port branch saas-12.3 up to 499d3efa7c 2019-08-13 10:08:12 +02:00
mcm-odoo 85e8de1dc8 [FIX] website_{portal, rating, slides): fix navigation tabs color
Text colors were white on a white background which can be difficult to read
in some extreme cases. Sort of.

Task 2026846
2019-08-12 09:57:12 +00:00
Odoo Translation Bot 452a4497c1 [I18N] Update translation terms from Transifex 2019-08-11 06:07:52 +02:00
asa-odoo 3bd03e27bb [FIX] website_slides: fix quiz completion blocking users in fullscreen
Once a quiz is completed in elearning fullscreen view a pop-up is displayed.
Due to z-index it makes a black overlay on full-screen, so that we can not
click anywhere on the screen.

In this commit we update z-index value fix the issue and make screen clickable.
Website menu is also still clickable.

Task: 2044221
2019-08-09 11:43:44 +00:00
mcm-odoo 896f649285 [IMP] website_slides: improve "New content" modal
Upload new course content should be revamped

  * general layout: https://drive.google.com/a/odoo.com/file/d/1zbNO0Vg1262ijkXA6pwSuenMI0h4NsPm/view?usp=drivesdk
  * remove picture tab;
  * display as two column with preview on right on change of picture
    or document;

Task 2049640 (website slides back2basics and fiximp)
2019-09-03 15:02:10 +00:00
mcm-odoo e53c398789 [IMP] website_slides: revamp "New Course" menu
Purpose of this commit is to change the modal to make it more mobile friendly.
Notably remove the two columns.

Task 2049640 (website slides back2basics and fiximp)
2019-09-03 15:02:45 +00:00
Michaël Mattiello 37bf69dd9d [FIX] website_slides: fixes some display issues in eLearning frontend
Fix some display issues in eLearning

  * fix the share button in documentation. It was not working as model was
    not correctly placed;
  * fix top3 users banners broken in mobile;
  * fix left menu of fullscreen being behind content on mobile (image, video);
  * removed upload button in training channel aside as there are already
    buttons available for that purpose;

Task 2049640 (website slides back2basics and fiximp)
2019-09-03 15:02:31 +00:00
Michaël Mattiello 8c9473fd78 [IMP] website_slides_{*}: improve backend UI, views and user actions
Purpose of this commit is to perform a back2basics on eLearning backend
views. It helps users in their daily use of eLearning and improve UI.

Containing

  * channel kanban view tweaking;
  * channel form view: some spacing and renaming improvements. Also set
    advanced field (new content email, share template) as group no one;

  * slide kanban view tweaking;
  * removed sections from kanban and list view for contents;
  * contents form view: various improvements, with notably

    * removed field website_url;
    * set publishded date is now readonly, tracked and in group_no_one as
      it is automatically set when publishing the lesson, and people should
      not update it manually;
    * removed the sum "Content" and replaced it by a stat button
    * reword quiz constraint error messages;

  * rating views improvements:
    * revamped the kanban view of rating that were a bit broken;
    * added a pivot view in Reporting/Reviews;
    * updated graph view in Reporting/Reviews;

This commit also provides some usability fixes

  * prevent sending email if new content is category;
  * email: Prevent displaying an image if there is no image;

LINKS

Task 2049640 (website slides back2basics and fiximp)
Task 2058595 (eLearning v13 testing)
2019-09-03 15:02:21 +00:00
laaandMichaël Mattiello c4eba6f5b1 [FIX] website_slides: correctly set sequence of newly added content
Purpose of this commit is to add new content at last position in frontend.
Indeed backend uses last position in embedded list view, frontend should
do the same. Moreover when having a lot of content, having everything at
the bottom of the screen at the same position of Add content / section
buttons makes sens.

Specifications

  * when adding a new category: add it as last category;
  * when adding a new slide in a category: add it as last slide of the
    category;

Specific case of slide without category

  * when adding a new slide without category: add it as last slide of the
    channel (display it as last) but keep it on top in backend view
    (display as first);

Improve content list display in frontend of eLearning

  * contents without section are now at the bottom;
  * fixed alignment of buttons icon (Add Content and Add Section)
  * fixed broken design because of title too long

Task 2049640 (website slides back2basics and fiximp)
Task 2061672 (new content bug report)

Co-Authored-By: Michaël Mattiello <mcm@odoo.com>
Co-Authored-By: Alexis Lacroix <laa@odoo.com>
2019-09-03 15:02:18 +00:00
Thibault Delavallée 3f4bd44075 [FIX] website_slides: do not allow fullscreen to bypass ACLs
Currently fullscreen takes all information from categorized slides to
display its menu. In order to avoid calls to server some information
is prepared in DOM to speedup loading. It means slide information is
available even when not being member of a course which leads to some content
leak.

This commit fixes that by correctly checking that a slide can be accessed
before allowing to have access to its information and embedded code. Access
of a slide is either member of a course, either course publisher.

Task 2058595 (eLearning v13 testing)
Task 2064112 (fullscreen bug report)
2019-09-03 15:02:16 +00:00
Thibault Delavallée 6d22405987 [FIX] website_slides: do not crash if there is any issue loading quiz data
Template displaying quiz should not crash if call to server did not answer
correctly. Minimal fix is to have void data to display. Real issue is that
unreadable quiz should not be displayed. This will be fixed in an upcoming
fix.

Task 2058595 (eLearning v13 testing)
Task 2064863 (quiz bug report)
2019-09-03 15:02:14 +00:00
Thibault Delavallée 1aeba9b900 [FIX] website_slides: do not put odoobot responsible of demo courses
Yeah Odoobot is great but have you tried Admin ?

Task 2058595 (eLearning v13 testing)
2019-09-03 15:02:10 +00:00
Sébastien TheysandJairo Llopis 1781041f13 [IMP] website, website_event, website_slides: add rel=canonical tag
The canonical tag is important for SEO, indeed it prevents search engines from
indexing duplicate content.

Reasoning
=========

The choice has been made to create the canonical tag automatically depending on
the request path, ignoring the query string, and manually prefixing the
appropriate domain and language code.

Indeed creating it manually for each resource would create a lot of code and
potential mistakes.

It is more dangerous to do it the generic way, but after investigation it
appears that it is an acceptable trade-off since the vast majority of our routes
are well built and already ready for this:

- using query string only for minor features that do not change the main content
- having the models, the ids, the pager and other important features in the path

Override
========

It is still possible to override the default behavior by passing
`canonical_params` manually to the view or to the different methods.

This is done for `/event` because the only way to display Past Events is to add
`date=old`.

Languages
=========

Fix an issue where it was possible for a bot to be on the URL without language
code but to use a language that is not the default language.

Adapt hreflang, because it:
- must only be present on canonical pages
- must always lead to canonical pages
- should not be set if there is no alternate language

Misc
====

task-1958075
closes #12532

Inspired by OCA module `website_canonical_url` courtesy of Jairo Llopis.

closes odoo/odoo#35852

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>


Co-authored-by: Jairo Llopis <jairo.llopis@tecnativa.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-09-03 12:11:35 +00:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Thibault Delavallée 3c95299018 [FIX] website_slides: always initialize computed fields
Creating channels and slides in backend was leading to warnings and/or crashes
because of computed fields not being always updated. With new computed fields
coming from 9920f20e4c this cannot be done anymore.

Task ID 2058595
PR #36281
2019-08-30 15:06:00 +00:00
Thibault Delavallée bf3cdac628 [FIX] website_slides: avoid display error messages twice in quizz completion
Purpose of this commit is to avoid having error message replacing the
cross used to close the container of the error message.

Task ID 2058595
PR #36281
2019-08-30 15:05:59 +00:00
mcm-odoo 373d59e866 [IMP] website_slides: add a toggle button to display/hide leaderboard
Before this commit, leaderboard was displayed only if user was not connected.
As we feel this is very interesting to show we decided to display it in all
cases (either connected or not) on eLearning frontpage. Activating it is
now done using an entry in the customize menu.

Task 2005981

closes odoo/odoo#35791

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-30 09:31:23 +00:00
ryv-odoo 695c65131b [FIX] elearning: fix invisible kanban view label
In the the kanban view of slide.channel, text belong numbers
was invisible (white on white) on the community version.
We change the class to be visible for each version.

TASK-ID : 2049115

closes odoo/odoo#35858

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-20 13:25:37 +00:00
Thibault Delavallée ff768a0642 [IMP] website_slides: add a publisher tour
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

This commit adds a course tour that test a flow for course publishers. Main
steps of this tour are :

  * a user (website publisher) creates a course;
  * he updates it;
  * he creates some lessons in it;
  * he publishes it;

LINKS

Task ID 1937768
2019-08-28 13:27:59 +00:00
Aurélien Warnon 215af4e1de [IMP] website_slides: add a member course tour
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

This commit adds a course tour that test a flow for course members. Main
steps of this tour are :

  * an user (either employee, website publisher or portal) joins a public
    course;
  * he has access to the full course content when he's a member of the
    course;
  * he uses fullscreen player to complete the course;
  * he rates the course;

LINKS

Task ID 1937768
2019-08-28 13:27:59 +00:00
Thibault Delavallée e9a5dcff74 [IMP] website_slides{_*}: improve demo data
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

Add some demo data to allow demonstrating various flows: training, lessons,
public, private, quizzes, ...

Also prepare future test tours by improving courses that will be used for
tours, notably the public one.

LINKS

Task ID 1937768
2019-08-28 13:27:59 +00:00
Lucas Lefèvre a9462adfcb [FIX] website_slides: allow portal users to rate
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

Portal users cannot post reviews as they have no write right on channels.
When trying to post a review on a channel this leads to a 403.

In this commit we correctly propagate channel access token to the composer
in order to allow rating.

LINKS

Task ID 1937768
2019-08-28 13:27:58 +00:00
Thibault Delavallée 608ea7f85d [FIX] website_slides: lessen concurrent update by waiting slide completion
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

When switching through slides using the fullscreen player it is quite
common to have concurrent updates on slide.slide.partner model as it is
used to store the viewed and completed. By correctly waiting for the
completion to be done we lessen potential concurrent errors.

LINKS

Task ID 1937768
2019-08-28 13:27:58 +00:00
Thibault Delavallée f93064606f [FIX] website_slides{_*}: fix completion computation, notably with certifications
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

Since 9920f20e4c course completion when finishing a certification survey
is broken. Indeed channel completion is not correctly recomputed. A
certification course can therefore never be completed and awarded. This
commit fixes that and correctly update channel completion based on survey.

In this commit we also rename some methods

  * _compute_completion: renamed to _recompute_completion to avoid naming issue
    with computed field convention;
  * _post_completion_hook is not unnecessary as code in hr_skill can be done
    after calling super of _recompute_completion;
  * _completed_callback is renamed to _set_completed_callback to be coherent
    with slides naming;

LINKS

Task ID 1937768
2019-08-28 13:27:58 +00:00
Aurélien Warnon bee50c4284 [FIX] website_slides: fix auto-completion of Youtube lesson
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

A slide is supposed to be automatically completed in fullscreen mode when
Youtube player reaches the last 30 seconds of the video.

This feature was broken because of wrong Promise completion and also because
Youtube API has apparently changed the way they send "events". "Playing" event
was not sent every X seconds. Function running to check the video timer has
therefore been reworked to take that change into account.

LINKS

Task ID 1937768
2019-08-26 13:33:22 +00:00
Thibault Delavallée 4c6abbb5e1 [FIX] website_slides: fix placeholder and kanban images
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

This commit fixes issues spotted when testing eLearning in backend

  * placeholder image was referring an unexisting image;
  * kanban was still using image fields prior to some image.mixin refactoring;

LINKS

Task ID 1937768
2019-08-26 13:29:49 +00:00
Martin Trigaux b247aa3252 [I18N] *: export saas-12.5 source terms
That will be used a the basis for the future 13.0 version
Without demo data

closes odoo/odoo#36057

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-26 09:38:09 +00:00