* = 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
closesodoo/odoo#36655
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
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
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
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
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)
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>
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
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
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
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
On `website` itself there is no `website_id` so the domain has to be read from
`self` directly.
Also oversight of forward-port 039e6bae99:
On `slide.channel` the override that was done in an earlier version is doing the
same as the generic override that was introduced later, so it can be removed.
closesodoo/odoo#35839
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This branch is the combination of several optimizations in the ORM:
* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;
* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;
* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);
* make method `modified` take advantage of inverse fields to inverse
dependencies;
* filter records by evaluating a domain on records in Python;
* a computed field with `readonly=False` behaves like a normal field
with an onchange method;
* computed fields are computed in superuser mode by default.
Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.
closesodoo/odoo#35659
Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
The 'index_content' field was only filled when uploading from the frontend.
That would lead to inconsistent results when creating/updating 'presentation' slides from the slide.slide form view.
The field was also not cleaned if the slide content changed.
As it's usage was not very clear (only on a 'search', and not very intuitive), we simply removed the field.
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
PURPOSE
Improve attendees management by adding a button to remove them in backend
of eLearning.
SPECIFCIATIONS
In order to easily remove a attendee from a channel, we add a button in
the slide_channel_partner tree view, accessible from channels (attendees).
Remove a slide_channel_partner implies to remove the related slide_slide_partner.
Also code backtracking for the view of attendees of a course: we redirect
to the slide.channel.partner model instead of res.parter because
we want the possibility to create/remove/edit attendees for a
course and not making action on res.partner model itself.
Task ID 2045620
PURPOSE
Improve daily use of slide, especially in backend.
SPECIFICATIONS
Make slide type editable in backend, notably at create. This commit makes it
possible for the user to manually define the type of the slide.
Slightly clean slide code about slide data.
LINKS
Task 1978731
PR #33255
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
This commit completely reworks the slide.channel form view
* improve the content management from the form itself by adding a tree view
with the possibility of drag and dropping slides from category to category.
This tree view has buttons to quickly add content or certification. It
also allow to add a category (slide with flag is_category) without opening
a modal;
* reorder tabs and fields, improve some labels;
* add a custom float field widget to display ratings as stars;
* add stat button for partners who completed/certified ;the course
* add stat button that redirects to the forum posts;
* add stat button that redirects to the channel reviews;
LINKS
Task 1978731
PR #33255
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
SPECIFICATIONS
Before this commit, creating a channel would crash because of NewID key
not existing in a dictionary for compute fields. A crash would also happen
when deleting a slide from the channel form view.
LINKS
Task 1978731
PR #33255
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.
Moreover, this feature was misused. It was:
- left on fields during multiple versions.
- used on reports (SQL views). This would be ok if the feature was
complete, but, as is, it was useless.
- kept unchanged after a second renaming of the field (which can happen
versions later the first rename).
- used, even when the meaning of the field changed. i.e. the field
`archived` has been renamed to the classic `active`, but the value
in the database should be switched.
* = website_forum, website_profile, website_sale,
website_sale_comparison, website_slides, website_slides_survey
Some image links were hard coded in the xml views of website, now they
are replaced with website.image_url(model, field).
Part of https://github.com/odoo/odoo/pull/34149
task-2007400
closesodoo/odoo#34149
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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>
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
Integrate a button on slide.channel form view allowing to perform a mass
mailing on course attendees. Do a flow similar to event.
Add menu entry in menu of slide.channel kanban card after invite
* Mail Attendees (same as on the course card and depend of the setting)
Add menu entry inside Settings
* Settings: add an option to install module mass_mailing_slide
LINKS
Task 1978729
PR #35061
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Jérémy Hennecart <jeh@odoo.com>
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
Add course (slide.channel) kanban view. Each tile should contain
* Title of the course (make it big, o_primary)
* Tags below the title
* Primary button "New Lesson"
* Statistics :
* Attendees
* Running (progress != 100%)
* (if one content is certificate) Certified or Finished
* See
* v1: https://drive.google.com/a/odoo.com/file/d/13K8FmkbwmBG4JQ5gH3Q5T8OlWPs3blcu/view?usp=drivesdk
With FP remarks https://drive.google.com/a/odoo.com/file/d/1mb7LUT0VUNs5fMcKB9c0Bfaqk2-XFFuu/view?usp=drivesdk
* remove globe, type and visibility of course, lessen padding between rating
views and watch time;
* for rating, instead of 8.00 => 5 reviews (4.5/5);
* replace "View Lesson" / "Invite" by "View Course" => Send to the front-end
* In the menu of the card, add:
* Invite (same behavior than before, when it was a primary btn)
* click on x Contents: land on the contents, group by category with sequence
* re-order of the 3 infos/Stats at the bottom of the card: 1. Content,
2. Attendee, 3. Certified
* + number: font-weight: 500 + font-size 1.2em
* + labels: remove text-uppercase, + text-color: #666666
* + the "whole box" is clickable
LINKS
Task 1978729
PR #35061
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Jérémy Hennecart <jeh@odoo.com>
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
Add in menu Courses, a new entry Reviews
* Kanban view, full width, no default group by
* Order by date (most recent on top)
* See: https://drive.google.com/a/odoo.com/file/d/1IYE1QBIJa26BLugRiafyBop-srkYwndC/view?usp=drivesdk
* add a tag for unpublished comments
* Add the pic of the user above the stars
* Click on card, send to front-end and able to (un)publish the comment
* Kind of what's on the front-end: https://drive.google.com/a/odoo.com/file/d/1e9aQSWvUM2QOynRT08XSUzIjFiGnjsv8/view?usp=drivesdk
LINKS
Task 1978729
PR #35061
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>
*website_crm_partner_assign, website_customer
Before this commit, some models would create their own `website_published`
field rather than using the `website.published.mixin` mixin which should be
used instead.
That was done to be able to override the default value of the boolean.
This commit simply adds the possibility to override the default value of the
mixin field.
Also, help and string could simply be added on xml views rather than overriding
the field.
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`
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
Adds two stats button on res.partner form view :
- The first one will show all the courses that the partner is following.
- The second one will show all the certifications the partner has passed.
When the partner is a company :
- All the courses followed by all the partners are shown without duplicate.
- All the certifications passed by all the partners are shown.
PR : #34908
Task ID : 2034097
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit improves the user experience in the slide.slide
form view by reorganizing fields, renaming fields and hiding
unnecessary fields.
This commit also introduces two new fields:
- comment_count: computed field that gets the number of comments on the slide
- channel_allow_comment: Related field to the channel_id.allow_coment.
This field is used to hide/show unnecessary fields
TaskID: 1978736
PR: #34232
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
closesodoo/odoo#33418
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Indeed we don't rate slides, we rate courses. Therefore rating mixin is not
necessary as well as access token.
Access token field as we are using the _mail_post_access and a karma check.
Commit linked to task 1952064.
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.
Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
As a portal user, complete some steps within a course
Completing all of them makes the course completion to 100 %
Now, in the backend, unpublish one of these steps
Before this commit, the completion was not taking into account
that a step did not "exist" anymore i.e. has been unpublished,
leading to a completion > 100%
After this commit, we search only for steps that are published
The completion cannot exceed 100%
OPW 2033553
closesodoo/odoo#34800
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
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.
closesodoo/odoo#34320
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, all url of channel were using `web.base.url` instead of the
current website domain.
Fixes#32348
The override of `get_base_url` method should not be forward ported after
saas-12.4 as since saas-12.5 it is now a model method (f727cd2645).
closesodoo/odoo#34421
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
When user uploads video and set thumbnail from Promote >
optimize SEO > social share, it shows a small image that
changed to a large resolution image
Task-2010019
closesodoo/odoo#34177
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Including
* change h4 to h1 on the slide page;
* add the rel='canonical' link header on the fullscreen view in order to
improve SEO and links;
* add space between quiz questions;
* remove social share statistics as they are broken and not really useful;
* moved tabs before the Quiz on the slide page;
* allow to modify slide in backend by removing some readonly attributes;
Linked to task ID 2010024
Related to PR #34176
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>