Commit Graph
124239 Commits
Author SHA1 Message Date
David Beguin 9f969fbcb0 [FIX] website_profile: always give access to user to his own profile
The main condition to be able to see a profile is that the user we want to
see the profile is website_published.
But if a new user sign up and wants to access his own profile, he must
get access to his own profile, even if he is (not yet) website_published.

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:05 +00:00
Aurélien Warnon b612766575 [FIX] website_slides: various fixes related to course page
* remove useless slide management buttons. This commit removes the frontend
   edit/publish/unlink buttons on slide cards (for the 'document' channel view)
   as they were not handled on the backend side.
 * hide slide type filter for documentation channels. The slide type filter
   (including statistics) on the left side of the channel frontend view
   was only handled for channels of type 'documentation'. This commit hides
   the slide type stats/filters if the channel is not of type documentation.
 * display add content/section buttons based on user rights. Fixes two channel
   frontend issues with user rights management:

   * Users that have the right to upload (can_upload field) should have the
    "Add content" button available.
   * The "Add section" button should only be available to website_publisher
     accordingly to ACLs

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:04 +00:00
Thibault Delavallée 59f439a3f9 [IMP] website_slides: do not display channel information and featured slide if search
Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:04 +00:00
sri-odoo 03a085dff0 [IMP] website_slides: improve homepage navbar design
Force white background + add the default bootstrap shadow. Do not use <h4>
tags to keep the right font-size on mobile. Simplify layout, add a second
navabar to handle content supposed to be moved to the right.

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:04 +00:00
Thibault DelavalléeandStefano Rigano cb483d2aa6 [IMP] website_slides: fix and improve homepage
Various fixes linked to homepage of courses

 * move channel navigation in its right container, clean its display and
   related templating;
 * display a Completed badge for completed courses;
 * display a cropped image for channel image card in order to avoid blank lines
   around image not having the right aspect ratio;
 * use standard qweb widgets, notably float_time;
 * make header and footer of /slides and /slides/all editable and improve
   their styling;
 * remove old and unused css linked to previous versions of homepage;
 * various small code cleaning;

Commit linked to task ID 1941250 and PR #31279.

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Stefano Rigano <sri@odoo.com>
2019-02-21 06:57:04 +00:00
Aurélien Warnon da66d49b51 [FIX] website_slides_survey: put the demo certification into a category
This commit puts the certification slide from the demo data into a category
so that it's correctly displayed on the channel frontend view.

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:03 +00:00
Thibault Delavallée 86226b52d3 [IMP] website_slides_*: update manifests
Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:03 +00:00
Lucas Lefèvre 30291091e7 [FIX] hr_payroll: Set benefit type on resource leave
Currently, when creating `resource.calendar.leaves` for a
`hr.leave` it creates one in the employee's calendar and one
in the contract's calendar if it's different.
But if both calendar are the same, it does not associate
the benefit type to the resource leave.

This commit fixes the issue and add unit tests for this use
case.

closes odoo/odoo#31288
2019-02-20 15:18:06 +00:00
Yannick Tivisse 2738341c21 Revert "[ADD] payment_ccavenue: Add new payment acquirer for India"
This reverts commit f735951d5c.

Revert payment acquire due to the fact that the encryption scheme
is broken by design and therefore cannot be trusted.

closes odoo/odoo#31281
2019-02-20 16:16:22 +00:00
Thibault Delavallée 72438ee5dc [FIX] website_slides: fix typo
closes odoo/odoo#31282
2019-02-20 15:10:30 +00:00
Robot Odoo 2140ccb2f6 [MERGE] website_slides: re-order templates and finalize model cleaning
Purpose of this merge is to perform a quick linting after having merged
several tasks and PR adding all requested eLearning features. Templates
are split for better understanding now that main templates for homepage,
course and lessons are in.

A model cleaning is performed as well as a-bit-late additions to stick
to specifications, notably splitting short and long description fields
on course.

See sub commits for more details. Merge linked to task ID 1941250 and
PR #31272.
2019-02-20 14:52:15 +01:00
Thibault Delavallée 3ecacb31a9 [REF] website_slide: split short from long description in channel model
Purpose of this commit is to provide a better way to display channel information.
Description is split into two fields. A text one, holding the short description
and used in channel header. A long html one, holding more details course
description.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:55:36 +00:00
Thibault Delavallée f43faad5a3 [REF] website_slide: rename statistics fields on channel and category models
Purpose is to reduce model naming complexity. Currently you have: slide_type
<type>, and related statistics on channel and category nbr_<type>s with a
trailing and error-prone s. Let us remove the trailing s to reduce complexity
of code reading. Some code cleaning in statistics computation is also done.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:24:30 +00:00
Thibault Delavallée 4e116ef055 [REF] website_slides: use mixin.image on channel and slide models
This recently introduced mixin allows to hide complexity of defining, using
and resizing images. Let us use it in channel and image model.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:24:30 +00:00
Thibault Delavallée 0e56426252 [FIX] website_slides: clean some model-related parameters
Quiz questions and answers should be translatable as they are intended
for end users and are displayed in courses frontend. Some required fields
are also missing. Some docstrings are cleaned.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:24:30 +00:00
Thibault Delavallée c6f473a914 [MOV] website_slides: split channel-type specific display in course into sub templates
It will ease maintenance and polish of those templates.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:24:30 +00:00
Thibault Delavallée 9ae7f5a261 [IMP] website_slides: perform some code linting and re-order frontend templates
Purpose is to perform some linting in code. No functional change should
occur with this commit, only some code move. Diff may appear huge but
it is just because some files are split.

This cleaning allow to better understand code and templates architecture
now that eLearning feature has landed in Odoo Community. It will ease future
additions, modifications and fixes.

Containing :
 * [REF] make some internal slide-related methods private as they are not
   intended to be called by outside world;
 * [MOV] new channel invite wizard in wizard folder;
 * [MOV] split frontend templates in some files to better locate code. There is
   now files for homepage, course, lesson, embed and utils in addition to
   slide-related profile template;
 * [REM] dead (unused) templates;

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:09:01 +00:00
Christophe Monniez db6e8f368c [REL] saas-12.2 2019-02-19 21:02:26 +01:00
Thibault DelavalléeandAurélien Warnon 49a005bbd1 [FIX] website_slides: set slide as completed only for valid members
Indeed some slides are available for external people if is_preview is set
to True. It indicates slide is available for teasing. It should not be
marked as completed for non members.

This commit is linked to task ID 1942836 and PR #31239.

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2019-02-19 16:54:23 +00:00
Thibault DelavalléeandAurélien Warnon 4f380f4aeb [FIX] website_slides: (temporarily) fix infinite loop
Do not fall into an infinite loop when fetching content of an empty webpage
slide in the newly-introduced fullscreen mode.

This commit is linked to task ID 1942836 and PR #31239.

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2019-02-19 16:54:18 +00:00
Thibault DelavalléeandAurélien Warnon 18f917fe3b [REF] website_slides: improve and make access options clearer
Purpose is to ensure more advanced use cases are still supported in new
elearning platform in addition to more public use cases. Fields controlling
access are now

 * enroll: who can enroll on course: public (everyone, simply click on join
   button), invite (added by already members) and payment (in bridge with
   website_sale, if SO with product is confirmed);
 * enroll_group_ids: automatically add members of those groups to the channel
   to ease having groups for a given subset of users;
 * visibility: who can see a channel and its slides: public (everyone, it means
   channel is visible on website for example), members (hidden for non members)
 * website_published on channels and slides; non publishers cannot see what
   is not published, whatever other parameters;
 * upload_group_ids: who can upload on a channel;
 * download_security on a slide is completely removed as it makes no sense
   for most slide types;

To ensure a better user experience responsible of a channel is added in its
members. People uploading a slide are now also allowed to read it to avoid
having inconsistency behavior between upload_group_ids and access rules.

Some tests are added.

This commit is linked to task ID 1942836 and PR #31239.

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2019-02-19 16:52:07 +00:00
sed-odoo fcc49c788f [IMP] l10n_be_hr_payroll: Add 'Individual account' report
Purpose
=======

Add the possibility to generate the 'Compte Individuel' (or 'Individual Account')
based on the belgian payslip for a specific year.

This report aggregates the payslip lines by month, by quarter and for the entire
year.

closes odoo/odoo#30487
2019-02-19 16:35:17 +00:00
Nicolas Lempereur 8bc2d85b1b [FIX] website_crm_partner_assign: deadline->expected closing
In the backend interface, lead/opportunity date_deadline is named
"Expected Closing" or sometime "Expected Closing Date" but on the
frontend it was named "Deadline" for opportunity.

opw-1941273
closes #31244
2019-02-19 12:19:31 +00:00
Antoine Guenet 6c38ed2f8d [FIX] web_editor: open the link modal on dblclick button descendent
The link modal only opened on double-click directly on an anchor,
meaning that double-clicking text in a span node within the button (as
is the case in the call-to-action snippet for instance) wouldn't open
the modal.
Now it opens as long as we have an ancestor that is an anchor, unless
the double-click occurs on a media (eg: a pictogram), in which case it
should open the media's modal.

closes odoo/odoo#31229
2019-02-19 09:56:32 +00:00
Geoffroy Larue 496d7fad74 [IMP] project: edit project form small reorg
Add a new group in the settings page, allowing to put some others
settings on the right side of the page (needed in enterprise).

Task-1942377 Closes #31212
2019-02-19 09:11:45 +00:00
Christophe Matthieu f1a5f2d3a4 [FIX] web_editor: clean or hide image handle data according to image size
closes odoo/odoo#31183
2019-02-19 09:37:25 +00:00
Christophe Matthieu 658be774fe [FIX] website: avoid double start edition
issue: 'enable_editor' and click on 'edit' before loading edition, or
double click on 'edit'
2019-02-19 08:43:51 +00:00
Christophe Matthieu a9f5d4fd9f [FIX] website: hide edit menu when the user click on save an wait reload 2019-02-19 08:43:51 +00:00
Christophe Matthieu e31b4050f0 [FIX] website: remove 'enable_editor' from the URL before edition 2019-02-19 08:43:51 +00:00
Christophe Matthieu e2f7b588e6 [FIX] web_editor: use website color for popover edition 2019-02-19 08:43:51 +00:00
Christophe Matthieu 4630afb671 [FIX] web_editor: speeder edition of field char on website_blog
Before this fix, the customize button was updated with each character,
which slowed down the fast insertion of characters and used resources
unnecessarily.
2019-02-19 08:43:51 +00:00
Christophe Matthieu 6739a5c1d4 [FIX] website: don't not edit not editable contents or branded hr, br... 2019-02-18 09:45:38 +00:00
mgh-odoo 9b169f8805 [IMP] mail : autofocus items in autocomplete inputs
With this commit, when using autocomplete inputs in Discuss
or chat windows, the 1st item is automatically auto-focused.

Example of autocomplete inputs:
- Discuss: "Add or join a channel" in sidebar
- Chat window: when clicking on "New Message" from systray
    messaging menu.

As a result, we can use keyboard keys to navigate and select
the desired item.

Task-ID 1894447

closes odoo/odoo#30207
2019-02-19 09:56:26 +00:00
Vandan Shah 3cbae36557 [IMP] *: Add progress bar on kanban views based on activities
Purpose
=======

If the activities are available on a model (i.e. inherits mail.activity.mixin),
add a progress bar based on the activities if nothing is defined yet.

closes odoo/odoo#24777
2019-02-19 11:01:40 +00:00
Vandan Shah a44e4ac6c4 [IMP] web: improve kanban tooltip
1) Remove the total record tooltip from kanban group.
2) Remove progressbar help from kanban view.
3) Improvements in testcase since we have removed total record tooltip.
2019-02-19 11:01:40 +00:00
Nicolas Lempereur 5062a26d18 [FIX] website_crm_partner_assign: deadline->expected closing
In the backend interface, lead/opportunity date_deadline is named
"Expected Closing" or sometime "Expected Closing Date" but on the
frontend it was named "Deadline" for opportunity.

opw-1941273
closes #31244
2019-02-19 12:19:31 +00:00
Christophe Matthieu 859ce50903 [FIX] web_editor: clean or hide image handle data according to image size
closes odoo/odoo#31183
2019-02-19 09:37:25 +00:00
Christophe Matthieu 41b470456c [FIX] website: avoid double start edition
issue: 'enable_editor' and click on 'edit' before loading edition, or
double click on 'edit'
2019-02-19 08:43:51 +00:00
Christophe Matthieu 9fff365d4a [FIX] website: hide edit menu when the user click on save an wait reload 2019-02-19 08:43:51 +00:00
Christophe Matthieu e3ad11d972 [FIX] website: remove 'enable_editor' from the URL before edition 2019-02-19 08:43:51 +00:00
Christophe Matthieu 832357f0b7 [FIX] web_editor: use website color for popover edition 2019-02-19 08:43:51 +00:00
Christophe Matthieu 60c013749e [FIX] web_editor: speeder edition of field char on website_blog
Before this fix, the customize button was updated with each character,
which slowed down the fast insertion of characters and used resources
unnecessarily.
2019-02-19 08:43:51 +00:00
Christophe Matthieu b7818fe036 [FIX] website: don't not edit not editable contents or branded hr, br... 2019-02-18 09:45:38 +00:00
mgh-odoo e096dc9b66 [IMP] mail : autofocus items in autocomplete inputs
With this commit, when using autocomplete inputs in Discuss
or chat windows, the 1st item is automatically auto-focused.

Example of autocomplete inputs:
- Discuss: "Add or join a channel" in sidebar
- Chat window: when clicking on "New Message" from systray
    messaging menu.

As a result, we can use keyboard keys to navigate and select
the desired item.

Task-ID 1894447

closes odoo/odoo#30207
2019-02-19 09:56:26 +00:00
qmo-odoo c564ae6c87 [IMP] website_slides: Add elearning feature to slides
Purpose of this commit is to introduce a new way of displaying and managing
slides in eLearning module. Its purpose is to give a better experience to
users when going through a course. Notably a fullscreen mode allows to take
lessons one by one without going out of the elearning display. Integration
of all slide types eases taking the course step by step.

Quiz are introduced in this commit. Those are an addition to slides with
some question / answers (multiple choice). It allows customer to gain karma
and improves gamification. Certifications are still done using the survey
application. Quiz targets only small tests at the end of a given slide.

A new widget is added to display and control slide display in fullscreen
mode. Old display is still available for documentation channels or when
going out of fullscreen mode, to see details on comments / review / statistics
and have access to share options.

This commit is linked to task ID 1902304 and PR #29876. It closes the main
work on refactoring website slides into eLearning, with other tasks already
merged in current community [1][2][3][4][5].

[1] Task ID 1940360 landed at b2149bc7a2: certification inclusion
[2] Task ID 1936153 landed at 6c6179e57c: homepage inclusion
[3] Task ID 1937160 landed at 8b7605c9e5: selling courses
[4] Task ID 1922159 and 1940516 landed at 5fa651cb01 and 6a64c3ce82:
    new user profile and gamification of slides / forum
[5] Task ID 1938643 landed at 77b5673a0d: upload channel/slide
2019-02-19 13:11:15 +00:00
Vandan Shah 7a80ebe35e [IMP] *: Add progress bar on kanban views based on activities
Purpose
=======

If the activities are available on a model (i.e. inherits mail.activity.mixin),
add a progress bar based on the activities if nothing is defined yet.

closes odoo/odoo#24777
2019-02-19 11:01:40 +00:00
Vandan Shah d09ecc8b18 [IMP] web: improve kanban tooltip
1) Remove the total record tooltip from kanban group.
2) Remove progressbar help from kanban view.
3) Improvements in testcase since we have removed total record tooltip.
2019-02-19 11:01:40 +00:00
Antoine Guenet f5c269db12 [FIX] web_editor: properly position image handle in product configurator
The image handle (grey overlay over the image) was not properly
repositioning on scroll in the product configurator (a side effect of
not having a popover).

closes odoo/odoo#31226
2019-02-19 09:06:49 +00:00
Antoine Guenet d9a77bd846 [FIX] web_editor: stop wrapping text in p on delete in anchor
This notably fixes a bug with the accordion snippet (website) where
selecting a title and typing seemed to add a newline.

closes odoo/odoo#31222
2019-02-19 09:46:28 +00:00
David Monjoie addeae990f [IMP] base,doc: add scales attribute to gantt view
closes odoo/odoo#31210
2019-02-19 08:28:29 +00:00