Commit Graph
98 Commits
Author SHA1 Message Date
Victor Feyens 594ccdcbf4 [FIX] *: typos and english incoherences
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).

closes odoo/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>
2020-09-08 18:12:26 +00:00
Patrick Hoste 375e38fcd8 [IMP] website_slides: send an email when an attendee finishes a course
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
2020-08-24 13:42:54 +00:00
qsm-odoo 42e1d4ca60 [IMP] website, *: enable the parallax option for all snippets
*: 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
2020-08-10 14:27:00 +00:00
Patrick Hoste 4f2a4b175f [REF] website_slides: improve elearning backend usability and onboarding
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
2020-08-11 10:31:23 +00:00
Patrick Hoste 8d30e343b1 [IMP] website_slides: set level related tag to data
Move level related tags from demo to data. Those are standard enough to
fill up tags data.

LINKS

Task ID-2241513
PR #55698
2020-08-11 10:22:12 +00:00
Jeremy Kersten b27f995089 [IMP] website_slide: typo in challenge name
closes odoo/odoo#53382

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-19 14:31:14 +00:00
Patrick Hoste 786374399e [IMP] website_slides: add possibility to request access to private course
PURPOSE

Before this commit, a user could not contact a course responsible to ask him
to join. With this commit he is be able to do it.

SPECIFICATIONS

Change the message 'Contact website administrator' to 'Contact Responsible'.

Add the name of the course responsible in the course description panel. When
clicking on its name it opens a modal to request access to the course. It
creates an activity linked to the customer and assigned to the responsible.

When hovering the 'You're enrolled' button the fa-check icon changes to a
fa-times icon to show that you can unsubscribe when clicking.

LINKS

Task ID : 2127364
PR : #40708
2020-06-08 10:43:53 +00:00
Benjamin Frantzen (bfr) e4a4ffb974 [IMP] customer ratings flow improvements
- Rename the 'Use Rating on Project' feature into 'Customer Ratings'
- Rename the 'Set Email Template to Stages' link to 'Set a Rating Email Template on Stages'
- Add an optional list view for the Stages menu
- display warning if the rating_template_id field is set and if one of the selected project_ids doesn't have the rating_status field set to true
- Project form view revamp
- rename the '% on tasks' stat button into 'Customer Satisfaction'
- Remove the 'no option' for the rating frequency field because it is required
- project form : Add a 'Go to Website' stat button
- Project dashboard: remove the 'Customer Ratings' menu item in more
- Ratings page: the 'Last 30 days' filter include ratings from today
- remove the Appointment / Helpdesk Customer Satisfaction / Live Support menu items

TASK ID : 1251
2020-05-08 12:17:20 +00:00
DramixDw 52c23e01e3 [REM] website,*: remove About us page and references
Remove the default about us page because it could be easily recreated and
doesn't add a lot of value to the website.

task-2189613
2020-05-01 07:58:11 +00:00
fja-odoo 11c60739e4 [IMP] website, *: warn user about outdated blocks
* = mass_mailing, web_editor, website_crm, website_event, website_form,
website_forum, website_hr_recruitment, website_mail_channel,
website_mass_mailing, website_sale, website_slides

When an outdated snippet's option are activated we display a warning
in the left panel that inform the user about the potential
malfunctions.

To do so the snippet's template key is added to the snippet as
data-snippet.
If a snippet is "t-call" inside another snippet, it will need to use
t-snippet-call instead of t-call to have the key on himself.

Those unique keys are used on snippet selection to retrieve the
snippet's version in the left panel and compare it with the currently
selected snippet's version. Versions are describe with data-vcss,
data-vjs and data-vxml. If a snippet's key is not in the left panel we
consider that snippet as outdated.

Added some tests to ensure that t-snippet and t-snippet-call really have
their template key as data-snippet

Adapted the views to the data-snippet changes adding
data-snippet="tmpl_key".

Part of: https://github.com/odoo/odoo/pull/44569
task-2189669

closes odoo/odoo#50254

X-original-commit: 28a6cd49b6e87b75c2e70771e241c41778bf9e87
Related: odoo/enterprise#10236
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-27 16:36:31 +00:00
Martin Trigaux 81a5cc2e10 [FIX] *: correct English terms
Some bad phrasing
Courtesy of Cecile Collart

closes odoo/odoo#48233

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-03-24 09:26:24 +00:00
Florent LejolyandAurélien Warnon 660e105431 [IMP] website_[sale_]slides: allow users to take the slide quiz before joining the course
PURPOSE

When previewing a slide of type 'quiz', users are tempted to answer the
questions even if they are not member of the course yet.

This commit will allow users to answer the quiz without being a member of the
course, and offer a smart redirection to join / buy based on the enroll type
of the channel.

SPECIFICATIONS

We introduce a "CourseJoinWidget" that will handle the display and the behavior
of the "join" button based on the user (public or not) and the enroll type
(public course or based on a payment).

When the user answers questions and he's not a member yet, we store the answers
temporarily in the session object.
When he comes back on the quiz page after having completed his membership, we
fill in the quiz based on his previously entered answers and clean the session.

LINKS

Task 2045571
PR #41972

Co-authored-by: Florent Lejolyn <fle@odoo.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
2020-03-12 08:30:16 +00:00
Tiffany Chang (tic) 4bc66ffc79 [IMP] website_slides: Add color to course tags
This commit allows assignment and visibility of colors to course tags.
In order to reuse existing code, the colors offered are the same colors
used for Kanban tags.

Visibility of these tag colors has been added to:
- slide channel form view
- individual course website
- courses (not-filtered) website
- user profile "about" page

Note that visibility was purposely not added to:
- Kanban view for courses since "no color" assigned tags are not shown in
  the kanban view by pre-existing design.
- Filtered courses website since selected tag filters are already
  color highlighted to make selected tag filter(s) more obvious.

Supports Task: 2128166
PR #44365
Upgrade PR: odoo/upgrade#862
2020-03-05 10:53:54 +00:00
mcm-odooandThibault Delavallée de1743ab12 [REF] mail, various: remove user_signature field from mail.template
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>
2020-02-11 14:01:13 +00:00
Victor Feyens d4e0fe018d [IMP] *: use ref= instead of eval="ref(' in xml field tags.
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 13:07:06 +00:00
qsm-odoo 599b5910f0 [REF] website, *: review xml using old title classes and structure
* website_event, website_forum, website_slides

Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:03 +00:00
qsm-odoo 4ca401a855 [REM] website, *: remove s_btn snippet
* website_slides

Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:01 +00:00
Samuel Degueldre 6481d0b353 [REF] website, *: remove unused class oe_custom_bg
*: web_editor, website_forum, website_mass_mailing, website_slides

This class no longer does anything.

Part of odoo/odoo#41561
task-2155808

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-31 13:25:21 +00:00
Patrick Hoste 1894dc5414 [IMP] website_slides: allow to download slide content and additional resources
PURPOSE

Currently eLearning lacks feature of having downloadable resources on
lessons. Indeed for example teachers would like to attach zip files or
other resources linked to a given lesson.

SPECIFICATIONS

You can now allow the user to download the slide content for pdf and image
slides. A new icon will be visible next to the fullscreen button on the pdf
viewer.

Course maintainers can also add additional resources to a slide which will be
available to download for the user.

Task ID 2066741
PR #39890

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-24 09:53:20 +00:00
Patrick Hoste e42ee496f8 [IMP] website_slides: add comments on answers showed after answering a quiz
PURPOSE :

A quiz after a course content is a good way to check if the user gets the previous lesson.
Despite, the user/student may not understand why his answer was wrong/correct.
In this task we'll allow the teacher to add a comment next to the asnwer of a quiz.

SPECIFICATION :

The quiz creator will now be able to comment the answers to inform the frontend user why
his answer is wrong/correct. He will be able to add the comments both in backend and frontend.

Task ID : 2072566
PR : #41188

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-24 08:56:12 +00:00
mcm-odoo 90bf317c01 [REF] website_slides: define specific eLearning user groups
PURPOSE

Have user groups specific to eLearning to separate them from generic website
editors. Indeed this is a specific work area and require more than pure design
skills.

SPECIFICATIONS

Two user groups are added in this commit

  * group_website_slides_officer

    + can read any course/slide
    + can create a course (will be responsible)
    + can write on its courses
    + can upload slides to the courses he is responsible
    + can publish slides to the courses he is responsible
    - cannot unlink courses/slides (you should archive them)

    * implies group_website_publisher in order to see the top navbar in
      frontend with the publish toggle button and the new content button;

  * group_website_slides_manager: has full rights

    + can read any course/slide;
    + can create a course;
    + can add slide to any courses;
    + can publish any courses/slides;
    + can unlink any courses/slides;
    + has access to reporting menu entries;

Rights for other groups are untouched for courses / slides. As a reminder
we still support responsibles being outside of eLearning groups, for example
if an employee is a teacher that handles a course:

  * people in upload_group_ids of a channel can upload slides, even if they
    don't belong to any eLearning group;
  * people responsible of a course can upload and publish slides even if they
    don't belong to any eLearning group (done through controller as they
    don't have real rights on underlying models);

We choose to keep the survey rights separated from eLearning ones. Indeed
it is easy in odoo to update the imply_ids field of groups if necessary
to link survey / eLearning groups; default user template can also be updated
easily. Standard Odoo should therefore correctly separate those groups. The
only specific rights is that eLearning officers can read all surveys, allowing
to choose them for certification-based courses.

LINKS

Task ID 2062462
PR #39485

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-12 14:12:51 +00:00
Thibault Delavallée 5649fc88e8 [REF] {website_}mail: move and replace published field of mail.message to is_internal
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFICATIONS

Website mail defines a website_published field allowing to publish / unpublish
comments on the frontend of some modules. This field has several drawbacks :

  * it is used only for front-end people (portal, public) and has no real
    effect in chatter / classic discussions;
  * it is used only in some advanced front-end module and is not available
    in portal by default;
  * its naming is not really correct as it is not linked to fields coming
    from the website_published mixin and its behavior is not really
    the same;
  * its use is a bit duplicated with internal flag coming from subtype
    allowing to hide messages related to an internal subtype;
  * there are overrides of standard mail.message methods just to handle
    this flag;

In this commit we change that field by an is_internal flag directly on
mail.message model itself. It tells if share people (customers, share users)
are allowed to read the message. This field can be given through posting
API or set manually using widgets. It is also used in access rights custom
methods and managed like the internal flag of subtypes.

Mailgateway was already using an internal flag for internal note replies. It
is renamed to is_internal and propagated as it is now a standard field. It
also eases code understanding.

Portal is updated to allow managing the flag directly. It means customer portal
now natively allows to moderate customer comments without any need of website
modules.

Rating is updated accordingly. An is_internal field is added, replacing the
related on website published.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Hoste Patrick ec9e389f2f [IMP] website_slides: allow to create and update quizzes directly in frontend
Purpose is to ease designing your courses by allowing to create and update
slide quiz directly in frontend, within the slide display.

With this commit you are able to

  * add a quiz to a slide or add a question to an existing quiz;
  * edit an existing question from a quiz:

   * change the title of the Question;
   * add, remove or update answers;
   * change the right answer;
   * delete an existing question;
   * reorder the questions from a quiz;
   * reset the quiz for the current user if he is a website designer, allowing
     to test the quiz and its answers;

New frontend widgets are introduced allowing to manipulate quiz. Slide page
now supports a readonly / taking quiz mode and an edit mode for quizzes
used notably for website designers / course maintainers.

Task ID : 1999636
PR : #35326

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-29 13:36:25 +00:00
David Beguin be3f074a91 [REF] gamification, * : rename challenge.category into challenge.challenge_category
To ease grep in the code, especially that challenge is quite heavily used.

Task ID : 1961053
PR #32594
2019-11-22 14:45:39 +00:00
Romain Derie 4178a383fd [IMP] http_routing, portal, website_*: clean 404 templates
A nicer 404 layout was introduced with e9106f8f98 but the specs got changed
just after it was merged.

It has been decided to make the 404 fully editable (before, everything was
fully editable except the popular page div).

In order to do this, the 404 template can't have inherited views, which brings
the following changes:
1. Remove every main website module xpath view adding their most popular page
2. Remove the xpath view in portal to add popular page part (was not needed
   in http_routing/web). It has been decided that having `Home` ('/' url) even
   without portal and/or website is not a big deal.

Those changes allow the 404 template to be written in a single view without any
inherited views.
The 404 will be the same for backend only databases, portal and website.

task-1966460

closes odoo/odoo#40637

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-21 14:12:47 +00:00
laa 92cc770c90 [IMP] website_slides: indicate new content on courses to users
Purpose of this commit is to help users knowing there is new content in a
course by adding a visual insight. It is done through a new content arrow
displayed in courses homepage.

Regarding the file "website_slides_templates_homepage.xml", the choice to
incorporate the t-call attribute into a 't' balise was necessary to display
the customize option (part front) associated with the model course_card.

Side dish usability improvements raised during development

  * display completed courses as last instead of first in "my courses";
  * do not show promote strategy field for training courses as it has no
    use, only for documentation courses;

TASK ID 2025186
Closes PR #36703

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-20 14:59:07 +00:00
Debauche Stéphane 249aad8f70 [IMP] website_slides: update demo data course responsible / attendee
Before
======
In the demo data, we manually add ``admin`` as an attendee of his course,
and then we remove it with ``_remove_membership`` because he will be added
automatically in python.

Now
===
We do not add ``admin`` as an attendee of the course, and we remove the
``_remove_membership`` call. We also change the responsible of some courses
so admin can join some courses.

Task ID 2120225
PR #39886

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-20 13:07:20 +00:00
Romain Derie e9106f8f98 [IMP] http_routing, portal, website: nicer 404 layout
This commit introduces a nicer 404 page, which is basically the same layout as
the one used on Odoo.com.

Also, the 404 is now fully customizable, blocks can be drag'd & drop'd.

task-1966460

closes odoo/odoo#38901

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-18 13:59:09 +00:00
mcm-odoo 42a24e4146 [IMP] website_slides: add progressbar and completed tag
- Teacher can now see the progress of his students on the attendees' list.

- The completion of a course was recomputed even if the course is completed
  now it's fixed to 100 when completed.

- Added a progressbar in course page in front-end to allow the user to see
  it's progression. When completed, the tag completed is displayed instead of
  the progressbar.

- On slide page in front-end(normal view or fullscreen) when a course is
  completed, display the tag completed instead of the progressbar.

- Removed completed state on course "Taking care of Trees" for portal user
  because it was not the case.

task-2049689

closes odoo/odoo#36608

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-23 08:54:57 +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 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
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
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
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
ryv-odoo 1b48730446 [IMP] website_rating : allow to comment message-based ratings
PURPOSE

Allow publishers to add a comment on frontend reviews with ratings. Purpose
is to allow to give some feedback or context on published reviews.

SPECIFICATIONS

In order to answer to a rating message (review) of a course (eLearning) or a
product (eCommerce) we add a way to the publisher to directly comment a review
inside the website rating chatter.

Any publisher can add/edit/remove comment of a rating message from the website.

The goal is not to enter into a discussion but just to give a feedback. This
comment is not sent or propagated to anyone, just displayed for information
purpose.

In portal chatter

* add 1 button below a review "Comment" (for publishers of the website only)
* only one comment possible by review/rating
* when the comment is added, display

* author name, date, comment
* 2 buttons, only visible by the website publisher: edit and delete

LINKS

Task ID : 2026911

closes odoo/odoo#35956

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-22 13:58:15 +00:00
mcm-odoo bc9c2aef16 [IMP] website_slides: improve and fix email templates
This commit improves the email that the members get when a new content
is published on the course and prevents the template to crash on preview.

task-1985511
2019-08-22 13:09:49 +00:00
mcm-odoo 453b9d5648 [IMP] website_slides: make member follower of a course
when a user subscribe to a course, the user is now automatically
follower of the course in order to be notified when a new content
is published

task-1985511
2019-08-22 11:51:58 +00:00
Aurélien Warnon 5269d8c27f [REF] website_slides: improve duration computation of a slide/course
The completion time of a slide now has default values for slides of type

  * video (duration of the YouTube video);
  * PDF (number of pages * 5 minutes);

This computation is done when uploading a slide in frontend or by an onchange
in backend. Field can still be given / modified by elearning people as
result may not be reliable (pdf parsing is not accurate, and/or you may
estimate time differently from strict page-based computation).

The course will sum up all durations of its (active) slides. Display has been
changed from "x minutes" to "x hours y minutes".

Task ID 2007294
2019-08-12 15:40:36 +00:00
qmo-odoo b180c66a80 [REF] website_slides: replace slide.category by slide with is_category flag
PURPOSE

Like already done for sale order, invoice of survey, purpose of this commit
is to remove category model and replace by a flagged line (slide). It allows
to easily reorder slides in an embedded list view.

SPECIFICATIONS

Instead of having a fully fledged slide.category model, slide.slide will serve
that purpose with a is_category flag. This will allow to drag and drop slides
and sections in the channel form view.

This change had an impact on the way slides were added/sorted on the front-end.
In fact, whenever a slide is added from the front-end, a resequencing of all
the slides in the course has to be triggered.

Category of a slide is now a computed field based on the sequence. Order
of slides is based on sequence, with categories splitting the slide list based
on is_category flag.

In this commit tests are added. Some cleaning in tests is also performed to
speedup a bit tests (savepointcase) and some cleaning / renaming to ease
their understanding.

Future commit will add JS necessary to manage slides in the section list view.

LINKS

TaskID: 1978731
PR: #33255
2019-08-08 08:29:34 +00:00
Jérémy HennecartandThibault Delavallée aeb23b21d3 [IMP] website_slides(_*): improve demo data and remove dummy data
PURPOSE

eLearning should have its own application in manager. Indeed this is becoming
a big application and having it embedded inside Website application is not
enough anymore. It should also hold updated and easy-to-use menus,
navigation, actions and views in backend.

SPECIFICATIONS

Remove "Our Documentation" dummy default existing data. It makes no sense
to have void data. Instead just add a small explanation text in eLearning
front-end telling the user to create its first course if he has rights to
do so.

In order to better show the new backend add some demo data for missing
numbers, notably

  * sales: add confirmed sale orders in order to have revenues value;
  * forum: add some posts and answers;
  * quiz: update slide.slide.partner demo data to hold quiz attempts count;

LINKS

Task 1978729
PR #35061

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Jérémy Hennecart <jeh@odoo.com>
2019-08-05 08:44:09 +00:00
Jérémy HennecartandThibault Delavallée 4587e6a396 [REF] website_slides: make eLearning an application with its own menu structure
PURPOSE

eLearning should have its own application in manager. Indeed this is becoming
a big application and having it embedded inside Website application is not
enough anymore. It should also hold updated and easy-to-use menus,
navigation, actions and views in backend.

SPECIFICATIONS

Update manifest and make website_slides an application separated from
website embedded menus.

Implement new menu structure

  * Courses
    * Courses
      List view: Course Name, # Views, # Attendees, # Ratings, Revenues,
      Reviews
    * Contents

  * Reporting
    * Courses: list view on slide.channel model, ordered by # views.
        * add a graph view (group by content)
    * Contents: graph view on slide.slide model
        Area Graph: X month
        Y measure: # Views (others measures: Attendees, ...)
        Group by: course (color)
    * Reviews: see kanban of latest reviews;
    * Quiz: list view on slide.question model.
        List view: Add # Quizz Trials, # Quizz Passed, Avg Attempts

  * Configuration
    * Settings
      * Allow Forum on Courses (installs website_slides_forum)
      * Allow Certifications (installs website_slides_survey)
      * Allow Selling Courses (installs website_sale_slides)
    * Course Tags
      * See channel.tags.group with label Course Tags, form view allow to
        configure group tags
      * https://drive.google.com/a/odoo.com/file/d/1G0g2UnG5cZG55EXQ5icbgwe7T2eSZskT/view?usp=drivesdk
      * On click: open :https://drive.google.com/a/odoo.com/file/d/1I_PW3aZAbrslXadiYqmVF-_6dGXx8knd/view?usp=drivesdk
    * Content Tags

This structure will gain new items in sub-modules, notably bridge with
form and website_sale. Those will be implemented in next commits.

LINKS

Task 1978729
PR #35061

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Jérémy Hennecart <jeh@odoo.com>
2019-08-05 08:40:33 +00:00
Romain Derie cc1d78a80b [IMP] *: correctly read/write website_published
The `website_published` field from the website's mixins is basically a readonly
from `is_published` field.
On read, this field will simply read `is_published` and check if the record's
website_id is accessible (only for the multi mixin).
On write, it will always write on `is_published`.

This commit improves a few things:
- A lot of code was writting on website_published which was just then writting
  on is_published. Writting directly on is_published makes more sense.
- Some backend fields would still reference `website_published` instead of
  `is_published` which would just go through the related for no reason.
  Plus, using `is_published` will make the field tooltip more accurate as we
  are not in a website context ('Visible on current website' to 'Is Published')
- Filter and search on tree view were still using the `website_published`
  related field, which is just a readonly when we are not in a frontend
  context.
- Some create and write function would have security check on
  `website_published` value but that was wrong as the user could bypass that by
  simply writting on `is_published`. For the write method, check `is_published`
  is more accurate as it will cover both case since `website_published` will
  then call the write method on `is_published`
2019-08-03 09:51:22 +00:00
Sébastien Theys 1e9772889b [IMP] *: use image.mixin when appropriate
The following models are already using big images, or they might need big images
in the future:

- partner
- hr employee
- shop category
- lunch product
- gamification badge and karma rank

PR: #34925
2019-08-02 16:47:58 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small  => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925
2019-08-02 16:47:58 +00:00
Patrick Hoste 38b5a666c5 [IMP] website_slides: add a share button on the fullscreen view
A share button has been added to the fullscreen view to avoid
exiting the view to access the share tab on the full description
of the slide.

Task ID : 1984509

closes odoo/odoo#33418

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-19 08:31:20 +00:00
Martin Trigaux fd15ca1918 [MERGE] Forward port of saas-12.4 to master up to 1f5a4649a6
closes odoo/odoo#34850

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:12:26 +00:00
Martin Trigaux 1f5a4649a6 [MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6
closes odoo/odoo#34820

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 13:59:35 +00:00
Patrick Hoste be5e8fdab8 [FIX] eLearning: allow portal user to share a slide by mail
Before, a portal user who tried to share a slide by mail got
a Odoo Server Error. He will now be able to share it without
any error.

closes odoo/odoo#34320

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-06-19 11:50:33 +00:00
Thibault Delavallée ef7871826e [REF] mail: template: move formatting to tools
This commit moves formatting helpers method used in mail.template to tools. The goal
is to reuse them anywhere in odoo, and not only in mail templates. Thoses method are
used to format date, datetime, amount, ... according to user localization (currency,
language, pattern, ...).

This commit also improve the formatting methods of 'date' and 'datetime': we are now
taking the 'lang_code' into account. Indeed, as the implementation uses `babel` lib,
it is easy and usefull to add the language option, to display the given dates into a
particular language. This parameter is optional to keep compatiblity with existing
code.

Task-2025396

Code Courtesy of @tde-banana-odoo
2019-06-28 06:51:16 +00:00
Thibault Delavallée 7afd23e56c [FIX] website_slides: various fixes
Display
 * improve color of trophy displayed on top of course main page (success if
   course done, warning while working on it);
 * correctly fetch and display karma/xp points on course lesson list. It is
   either gain of next try, either awarded points depending on slide
   completion;
 * fix control buttons in course main page (prev, next, set done,
   set completed, fullscren), notably correctly set them disabled;

Linting / Code
 * put demo in no update;
 * rename some parameter in website_slides_survey to avoid conflict between
   quiz (on a slide) and certification (a survey);

 Commit linked to task ID 1941250 and PR #31697.

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-08 11:15:07 +00:00