Commit Graph
306 Commits
Author SHA1 Message Date
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 9b9829416b [IMP] website: simplify website menu
Some apps, once installed, automatically create a menuitem in website.
What complexify the UI and create useless menu withtout plusvalue.

It is not because you install livechat to make support online, that you want
a link in your menu to show stats e.g.

Now we remove the default menu created, and help user to find it when he create
a link. The autocomplete suggest most of the main App's controllers

task-2189613

closes odoo/odoo#49081

Related: odoo/enterprise#9733
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-01 07:59:07 +00:00
jerome hanke (jhk) ffe119d03e [FIX] website_slides: leaving a course unsubs from the related channel
Steps to reproduce:
- install eLearning
- go to the website > courses > enroll in any course > leave the course

Previous behavior:
you are not unsubscribed from the slide channel and still receive mail
notifications

Current behavior:
you are unsubscribed from the channel when you leave the course

opw-2244716

closes odoo/odoo#50404

X-original-commit: cb262738a20fad3e5114e9df21b77f499347745e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-04-29 14:53:28 +00:00
Patrick Hoste 03e62ac8ad [IMP] website_slides: publish content when publishing slide
Purpose of this commit is to avoid de-synchronization where content could
be unpublished whereas slide was published.

Task ID 2239840

closes odoo/odoo#49908

X-original-commit: d0f4a3e85eab63e335766a823185fd6ada6e07b4
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-22 06:46:46 +00:00
Patrick Hoste ec2b38dd1f [IMP] website_slides: allow user to download slides pdf by default
PURPOSE

To align on the v13.0 enable the 'Allow Download' option by default.

SPECIFICATION

Change the default value of slide_resource_downloadable from False
to True.

LINKS

Task ID : 2225802
PR : #49951

closes odoo/odoo#50164

X-original-commit: 44bfb8c73f9abc563ce764411610f45e5bdf18b1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-24 14:51:49 +00:00
Thibault Delavallée d73a92505c [IMP] website_slides: implement archive cascade behavior in toggle_active
Purpose of this commit is to make use of toggle_active to implement business
behavior linked to active field being changed. In this commit we move the
business specific code from write to toggle_active. When archiving a channel
its slides are archived.

In this commit we also track active field for courses and slides, allowing
to see flag changes in chatter.

Task ID 2170708
Community PR odoo/odoo#46563
2020-04-03 12:59:29 +00:00
fja-odoo 388c222c6c [IMP] base, *: allow html fields not to sanitize forms
* = event, website_event_track, website_sale, website_hr_recruitment,
website_livechat, website_sale, website_slides

The option to sanitize or not the forms was not available, this will
allow better flexibility on whether forms should be sanitized or not on
an HTML field.
Also we use this new param to allow forms to be added on some already
existing html fields where forms where sanitized out.

task-2209554

closes odoo/odoo#47318

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-31 14:22:43 +00:00
Adrian Torres 1daf8eb127 [FIX] *: set ondelete policy of required Selection fields
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.

This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.

closes odoo/odoo#46325

Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-30 13:42:04 +00:00
qmo-odoo 12c6d77e7f [FIX] website_slides: fix slide reordering in frontend
This commit fixes the reordering of slides on upload or drag and drop
in frontend. This issue was due to the fact that in a previous commit
(c4eba6f) uncategorized slides were moved to the bottom of the list,
which broke the reordering after drag and drop.

Indeed we use the dom order itself to reorder the slides with a simple rpc
call to dataset/resequence. Instead we revert part of the previous fix
to display uncategorized slides at the top. It allows to be coherent with
resequence and with backend behavior that displays uncategorized at the
top of the list.

Another issue was that, on slide upload, in the controller, we used
the category_id on the slide (which seems to not always be correct at
this stage) instead of the one given by the javascript. This caused the slide
to not be uploaded in the right section.

This commit also adds some margin to the categories in frontend for training
courses. Otherwise uncategorized slides are too close to the first category.

Task ID 2090927

X-original-commit: 7bd042d6e20c44558b90641409a6e3f8fa8000ed
2020-03-26 15:57:43 +00:00
Quentin Mourier 843caa270c [FIX] website_slides: fix resequencing based on category
When new slides are added through frontend a resequencing of slides and
categories sequence is done by calling _resequence_slides on the channel.
However this method is not working as expected, and resequencing should
take a category in order to better know where to start its resequencing.
Otherwise it simply reorder slides in the same order as before, or in an
unpredicted or prodicted but fasly order if new slide category has just been
created.

Task ID 2090927

X-original-commit: f038946ae2e3f174bee086281a541c6bc770e354
2020-03-26 15:57:43 +00:00
jvm-odoo 5eea6b278e [FIX] website_slides: fix undeletable question answer
Issue

	- Go on Runbot V13
	- eLearning
	- In a course, try to delete a question

	You can't

Cause

	The linked answer is not deleted
	If you want to delete the answer you should
	add an extra menu

Solution

	Add ondelete='cascade' on answer's question_id
	Prevent course deletion if there are attendees

OPW-2210096

closes odoo/odoo#48372

X-original-commit: 799ee72facbca7a7eaf348938ed312a6d723854e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-25 16:04:59 +00:00
Thibault Delavallée a03f6483d6 [REF] mail: clean code about rendering in mail_template
PURPOSE

Clean and rename code about language management and template rendering in mail
template model.

SPECIFICATIONS

Clean method naming and try to make code easier to understand and call. Also
add and/or clean docstrings of rendering methods.

Notably

  * ``_classify_per_lang``: for each lang-contextualized template, give the list
    of record ids;
  * ``_render_template``: now working only on a valid list of IDs instead of
    allowing both int / list and having a return type depending on the input
    type. It allows to simplify code and delegate some processing to callers;

Introduce new API method

  * ``_render_lang``: for each record id return the lang matching it;
  * ``_render_field``: render a field of mail.template, on given set of record
    ids. Usage: template._render_field('body_html', records.ids). Language
    computation is available for this method;

Remove the "multi mode" support of rendering that either returned a rendered
value, either a dict based on given ids. Now all methods always work in batch
and caller have to fetch the correct result if necessary.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:18 +00:00
Martin Trigaux a14fd21c60 [FIX] website_slides: completly leave a channel
When leaving a channel, remove the earned karma in addition of the
slides.
This way, the user goes back in the same state as before completing
the course.
Add a message to clarify to the user the impact of leaving a course.
Add a test to answer questions

opw-2199066

closes odoo/odoo#47166

X-original-commit: a5e66d681ccd760c0af7bd0b179b5e42c76577ba
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-03-09 09:10:29 +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
Tiffany Chang (tic) ff828a3e0c [IMP] website_slides: Update "Course Tag" UX
Minor UX updates for clearer wording, better visuals, and more intuitive
interface. Specifically:

- update slide.channel.tag.group form view and related menu item
- update css so 2nd line of course tags on main course page are not cut
  off

Supports Task: 2128166
PR #44365
2020-03-05 10:53:31 +00:00
Swapnesh Shah 8f703cb050 [FIX] website_slides: reset public views when duplicating
Followup on 82ce815a8c . When content (`slide.slide`) is
duplicated, public_views should not be copied. Indeed it gives a new slide
and it makes no sense to keep the old slide statistics.

closes odoo/odoo#46084

X-original-commit: a2f5f8b552b48483ce5fdf0be04da7c27b326f2e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-24 11:52:00 +00:00
Romain Derie d92f76592c [IMP] website(_blog/_slides): show a toaster when a record is published
This commit shows a toaster when publishing a record through the toggle in the
topbar.
The `_description` field is used to do that, as it is supposed to contains a
'business oriented' descriptive name, see task-37311. Indeed, this field is
used in studio and in mail templates.

task-2144335
2020-02-03 15:25:20 +00:00
Tiffany Chang (tic) 830395e49a [IMP] website_slides,portal_rating: update UX
Minor updates to improve user useability of website_slides primarily with
clearer wording and more intuitive displays/display interactions. Primary
purpose is for onboarding wow.

Related to:

closes odoo/odoo#42030

Task: 2070662
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-16 09:11:27 +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
Debauche Stéphane 01dadaecca [IMP] website_slides: improve error message when google API key is invalid
Currently when there is an issue with the google API key, a generic message
is send to the user, with the error details embedded in it in an ugly way.

Now a message is displayed: "Your Google API key is invalid, please update it
into your settings. Settings > Website > Features > API Key". This is done
by parsing the JSON google sends back after request and determining if the
error is linked to the API key.

Task #2082857

closes odoo/odoo#40547

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-20 12:24:43 +00:00
Thibault Delavallée 4ef326de3c [FIX] website_slides: fix wrong comodel name in many2many
Channels uses tags allowing to categorize and filter content. For that
purpose a m2m exists between channels (slide.channel) and tags (slide.channel
.tag). The 2many relationship from tags to channels holds however a wrong
comodel name. It has no impact on code since relationship table is
correctly defined and current code does not use the channel_ids fields
from tags.

closes odoo/odoo#42244

X-original-commit: 46c3ac94485292c59fdfe4b21a8e32eef9d1f998
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-20 10:38:22 +00:00
Jérémy Hennecart cbab93f40c [IMP] website_slides: rename string for quiz attempts
When exporting fields, the reward attempts fields were split from each other. By grouping them, it allows
easier management from user as all rewards fields are now grouped in the export wizard.
Additionaly, they are also grouped in the dropdown for custom filter.

task-2155189

closes odoo/odoo#42103

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-18 11:54:40 +00:00
Aurélien Warnon 648bbbec9a [FIX] website_slides: fix slide.slide statistics compute method
The slide.slide and slide.channel "_compute_slides_statistics" methods do not
always assign a default value for the "total_slides" field.

This can cause some CacheMiss and seem related to nondeterministic errors on
the runbot.

Task#2123711
Runbot build error ID 247

closes odoo/odoo#41942

X-original-commit: c240d04ed0518897f76b315cd354ea6606aea645
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2019-12-12 13:38:51 +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
Thibault Delavallée e2b33f460d [REF] mail, various: rename subtype parameter of message_post to subtype_xmlid
PURPOSE

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

SPECIFICATIONS

In order to be more explicit subtype parameter is renamed to subtype_xmlid.
It therefore clearly indicates it should be a valid subtype Xml ID. Support
of ill formatted Xml IDs is removed because there is no reason to try to
add some random prefix. Give something that exists or go to hell, punk !

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Thibault Delavallée 1838191eec [REF] mail, various: improve mail creation calls, notably author and email from default computation
Purpose of this commit is to correctly compute author_id and email_from
in mail_message and mail_mail as they depends from each other. Moreover it
is a good idea in various flows to specify email and author when giving
creation values to avoid default computation that is not always guaranteed to
be accurate notably when involving super user.

Mail message creation could lead to desynchronized values between author
and email_from. This is improved with this commit by correctly inheriting
from default_get and computing both of them at the same time instead of having
two default values. Indeed they depend on each other.

Same thing is done for mail composer. Mail Thread offers a tool method to
find email_from / author_id based on having one of those values or current
user and it is called whenever necessary.

Some calls to mail template send_mail are also cleaned.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
Thibault Delavallée b9a22d2f24 [IMP] mail: add computed fields for company emails
Purpose of this commit is to give a way to access to company email and catchall
with formatting. Those will be used in various automated emails. Indeed
currently several templates use either ``company_id.partner_id.email``,
``company_id.email``, or even don't provide fallback values.

With this commit from a company record people will be able to use

  * a correctly formatted catchall: ``"My Company Name"
    <catchall_alias@catchall_domain>``
  * an email_formatted field like partner email_formatted that is either its
    partner-related email_formatted value, or formatted catchall if its partner
    is not correctly configured;

Various calls to mail creation are updated accordingly.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +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
Thibault Delavallée a4abdfa316 [IMP] website_slides: merge slide quiz answers constraints in a single method
Currently there are several checks on answer integrity for slide quiz
questions. In this commit we simplify code to effectively implement
what is requested: 1 valid answer and at least 1 invalid answer.

Task ID 1999636
PR #35326
2019-11-29 13:36:25 +00:00
Aurélien Warnon 34b1ceb942 [FIX] website_slides: fix slide.slide statistics compute method triggers
The slide.slide "_compute_slides_statistics" method is missing the 'slide_ids.sequence' trigger.
It should be specified for cases when one of the slide_ids changes category (determined by the
sequence).

This can cause some CacheMiss and seem related to nondeterministic errors on the runbot.

PR #40705
Task#2123711
Runbot build error ID 247

closes odoo/odoo#40867

X-original-commit: 1994f544694051a767ecda88a12dee5c5579add2
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2019-11-25 08:38:03 +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
Florimond Husquinet (fhu) 07f70e3c10 [IMP] website_slide: add a card description independent from short description
The Channel model contains the two following fields: `description` and
`description_html`. The former is a short plain-text description that can be
filled in the creation form. The latter is a long html-formatted description.

Before this commit:

The description displayed on the card of the course is the `description` field.

After this commit:

There is an additional `description_short` field, which is initialized to the
same value as the `description` field. If the `description` field is modified
the `description_short` reflects the modifications. This happens however only
if the user didn't modify the `description_short` field manually. If it is
modified to another value manually, the link is broken.

Description short is now used only on the course page, below title, in the
header. Description short is used in kanban card displayed in homepage.
Html description is used as a long course description on course page.

Beside, in the creation form of a course, the description textarea is now a
one-line input field to reflect the fact that it's supposed to be a relatively
short description.

Task ID: 2026165
PR #39388

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-21 12:25:52 +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
Thibault Delavallée a8449773dc [FIX] website_slides: add explicit depends on non stored computed fields
Even if it works in current flows it is better to give some fields their
right triggers (fields and uid).

PR #36703
2019-11-20 14:43:15 +00:00
Thibault Delavallée 7a3217f810 [MOV] website_slides: keep files well organized
Oversight of 9b38bcec12

PR #36703
2019-11-20 14:43:03 +00:00
ryv-odoo c7a1a2d964 [REF] rating, various: improve rating.rating ACLs
PURPOSE

Rating model should be available only for internal users. External users
access them only through dedicated routes or controllers using sudo and/or
granting access through tokens. Therefore simplifying ACLs should be feasible.

SPECIFICATIONS

Remove access to rating.rating for public and portal users. Only employees
can access it, with full access given to system admins.

Update various functional flows to use sudo() and check that access is
verified before using sudo.

Impacted modules

  * rating / mail: add groups on some rating related fields as only
    internal users should access them now;
  * rating / mail: set some statistics fields using compute_sudo as their
    value should be accessible for external people even without access to
    the underlying rating.rating records;
  * project: makes some use of rating and has to be updated, notably for
    the public rating page;
  * website_{livechat, rating, slides}: add sudo in public routes as access
    is already granted;
  * website_slides: set statistics field using compute_sudo as their
    value should be accessible for external people;

TASK ID 2053096
PR #36592

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-19 15:46:51 +00:00
Victor Feyens 4e3e268083 [FIX] website_slides: default values for all compute fields.
closes odoo/odoo#40263

X-original-commit: 2cab75b41763fed0b86d919e005d9a65cd3b85ac
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-14 12:56:57 +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
mcm-odoo 748f0c88c5 [REF] website_slides: add completed_slides_count field in slide.channel.partner
This commit adds a new field "completed_slides_count" in slide.channel.partner
completed_slides_count has the same role as field completion before this commit
Now the field completion is a % of the completed slides

task-2049689
2019-10-22 06:35:25 +00:00
fw-bot bf5744b5c3 [FIX] website_slides: Do not copy Members on duplicate
closes odoo/odoo#38447

X-original-commit: ef34fc7b900d9da46354a49f3f283531d29d3978
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-11 02:02:33 +00:00
fw-bot c47b1f7dd2 [FIX] website_slides: Add fetch timeout
This makes you actually able to install the module with demo data and unplugged from network. Otherwise, it's impossible.

closes odoo/odoo#37903

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-03 15:09:59 +00:00
Romain Derie 9b38bcec12 [IMP] website, website_*: improve edit in backend feature
*base, website_blog, website_event, website_forum, website_slides

With this commit:
1. It is now possible to add the 'Edit in backend' entry in the frontend navbar
   for any desired model, not only the ones which have the published mixin.
   It will simply redirect to the main_object form view.
   This commit add it to Forum and Blog.
2. When clicking on 'Edit in backend', it is now possible to land on another
   module than Website.
   That's especially useful for events and slides which are not directly
   related to the website module as they have their own module.
3. Remove the custom Edit in backend from the forum homepage (fa-cog).
   Opportunity was also taken to remove the 'edit welcome message'.
   It will now be editable through the editor (welcome message will appear in
   edit mode). Thus we got rid of the custom edit welcome message controller
   and views.

Closes #36325
2019-10-02 07:13:26 +00:00
Stéphane Bidoul (ACSONE) c8c8413e3e [IMP] mail: enforce kw args for message_{post/notify/log}
Since there are message_post overrides using the form `def message_post(self,
**kwargs)` in some modules, this method is intended to be invoked with keyword
arguments only.

This commit enforces this behavior. Calls such as `message_post("body")` will
fail regardless of which addon is installed, forcing users to use
`message_post(body="body")`.

It also fixes a message_post override in hr, and applies the same
mechanism to message_notify, and _message_log.

closes odoo/odoo#33306

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-02 15:42:04 +00:00
Thibault Delavallée 99585eacfb [FIX] website_slides: avoid computing access fields as sudo
As compute sudo is now the default values let us ensure fields controlling
actions and access are done using the current user, not admin.
2019-09-20 13:44:09 +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
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 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