Commit Graph
124453 Commits
Author SHA1 Message Date
Aurélien Warnon 5db9ed0391 [REF] website_slides: refactor the slide archive modal on frontend
Purpose
=======

This commits refactors the slide archiving confirmation modal to make it a
standard Dialog (remove global selectors, remove most of useless xml, ...).

It also adds a new slide archive route to allow channel publishers to archive
slides in sudo mode. Indeed ACLs only website_publishers can write on slide
model. In some case people without real rights may update slides.

Commit linked to task ID 1942852 and PR #31394.
2019-02-26 16:07:16 +00:00
David BeguinandAurélien Warnon 362271f35a [FIX] website_slides: fix some small model-related issues
* improve is_preview field string and help. 'Always visible' was not really
   clear and self speaking. A help string is added to describe what this field
   implies;
 * fix slide.channel invite button for 'invite' enroll mode. While renaming
   the "visibility" field to "enroll", a check was missed for the slide.channel
   invite feature. This commit fixes it by properly checking for enroll instead
   of visibility;

Commit linked to task ID 1942852 and PR #31394.

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
2019-02-26 16:05:45 +00:00
Quentin Mourier 70add1c212 [REF] website_slides: apply linting and cleaning to elearning lesson pages and widgets
Purpose of this commit is to perform some linting and cleaning in lesson widget
JS and its related css. Notably for fullscreen widget of eLearning. Containing

 * better naming of css classes;
 * deleted sidebar file as it is now included directly in the fullscreen
   widget;
 * removed unused css;
 * apply JS linting;
 * clean some controllers;

Commit linked to task ID 1942852 and PR #31394.
2019-02-26 16:05:40 +00:00
Christophe Simonis fcb972db9d [FIX] test_website: skip broken test 2019-02-26 14:31:05 +01:00
Christophe Simonis 7f0a3101f5 [FIX] website{,_sale}: adapt tours to new html editor
See f296992317
2019-02-26 14:28:25 +01:00
Christophe Simonis 7e1935f0b4 [FIX] website{,_sale}: avoid tour dependence on portal
See 6521cf4f66
2019-02-26 10:39:09 +01:00
Christophe Simonis b3766768f9 [FIX] website: correctly extract failed node in QWeb exceptions handling 2019-02-25 16:17:09 +01:00
Christophe Simonis b13305fddc [FIX] hr_payroll: call correct method
Oversight of previous forward-port
2019-02-22 17:00:17 +01:00
Christophe Simonis 0e7675847f [MERGE] forward port branch saas-12.1 up to 0f4abc5c22 2019-02-22 16:25:02 +01:00
Christophe Simonis 0f4abc5c22 [FIX] website_sale: adapt test to demo data update
`stock` module rename then main company, which forbid test to complete
successfully.
2019-02-22 14:26:54 +01:00
Christophe Simonis 9332e25195 [FIX] web: remove extra test added by forward-port
As related patch hasn't been forward-ported, this extra test (that isn't
execute for unknown reason) can be removed.
2019-02-22 11:14:43 +01:00
Christophe Simonis 7f9b7beed8 [MERGE] forward port branch 12.0 up to b2db72c9d1 2019-02-21 21:36:52 +01:00
Robot Odoo 1af67ffdfa [MERGE] website_slides: improve layout of courses main pages and apply various fixes
Purpose of this merge is to provide several fixes related to new elearning
application [1]. This is second batch of fixes [2]. Those are mainly fixes
and improvements for front-end templates: layouting, clean design. Some
other fixes are also included, notably links and search capabilities.

See sub commits for more details.

Thanks to @awa-odoo @jem-odoo @stefanorigano @qmo-odoo @dbeguin
for their work as most of code come from cherry-picks.

Merge linked to task ID 1941250.

[1] eLearning feature: see task ID 1902304
[2] First batch of fixes landed at 5cec06b179

closes odoo/odoo#31317
2019-02-21 18:29:32 +01:00
Christophe Simonis b2db72c9d1 [FIX] core: handle multiple m2o levels in Form
closes odoo/odoo#31335
2019-02-21 17:03:27 +00:00
Christophe Simonis 644aeb2cd6 [FIX] test_testing_utilities: correct on_change
Avoid searching `[('name', 'ilike', False)]` as it doesn't make any
sense (and behavior changed in saas~12.1)
2019-02-21 17:47:46 +01:00
jem-odoo 039df4a79e [FIX] website_slides: fix vote widget
Fix route of vote widget. Set it to auth=public so that instead of a crash
we have correct popup asking to login. Better than a SessionException, which
will not be displayed.

Another fix is done to avoid having one widget for all displayed like / dislike
buttons. Each slide should have its own vote widget.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:39:56 +00:00
Thibault Delavallée fdc36c5c37 [IMP] website_slides: improve main course page in documentation mode
Purpose is to clean a bit the card layout in documentation courses, notably

 * better layout for cards:
 * fetch (in controller as slides in course display are sudo-ed to display
   a card even if current user has no access) completion data and display it;

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:38:20 +00:00
jem-odoo 95ab97c2f3 [FIX] website_slides: reload page when joining channel
When a user join a channel, the button 'join' changed and indicates
him that he is now member, but since the page is not refreshed, he
still can not access to slides displayed on the page.
This commit makes the widget trigger a page refresh.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:38:17 +00:00
jem-odoo 1a89a3fcc4 [FIX] website_slides: bad xml ids on fields
Having bad xml ids, even on groups fields, causes crashes, even
when duplicating a record.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:38:16 +00:00
jem-odoo 7d1af42c06 [FIX] website_slides: fix some rating issues
Last review should be a comment. When fetching the last message on a course
the returned message can be a system notification (like "Channel created").
This is not what we want, mostly with the feature allowing to modify the body
of a message. This commit add restriction on the domain fetch last message.

Fix default rating value on popup widget. The conversation ratio (rating 1-10
and 5 stars) was not applied everywhere. So, the number of displayed stars was
doubled. This is now fixed.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:38:14 +00:00
Aurélien Warnon 55f93a240f [FIX] website_slides: handle "My courses" to filter user's channels
Purpose: the "My courses" button on the slides home page now redirects the user
to the list of channels for which he is a member of.

In this commit we also clean a bit controller code to remove support of
category_id which makes no sense on a page displaying courses as categories
are not cross-courses, only course-specific.

A clear search icon is also added.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:38:11 +00:00
Aurélien Warnon 9f74ccf403 [FIX] website_slides: fix some styling issues on training course page
This commit do some small UI adjustment:

 * remove a potential doubled <hr/>;
 * remove a "mb8" to make views consistent whether you're a channel publisher
   or not;
 * add a specific parameter to see 'uncategorized' slides on a documentation
   channel as /category is a slug and does not allow Falsy values;

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:38:04 +00:00
sri-odoo 0a73e14805 [REF] website_slides: improve design of "all courses" main pages
Containing notably

 * improve banners;
 * sidebar achievement design;
 * some sidebar adjustments;
 * adapt to circular rank progress the current user sidebar;
 * improve overall spacing;
 * improve cards design and size;
 * improve 'all courses' grid layout;
 * clean unused css and templates;

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:38:00 +00:00
sri-odoo 920a48b32f [REF] website_profile: add circular rank progress
Purpose of this commit is to add a circular progress around the rank of
a user when seing its profile. It allows to see at a glance advance for
next karma rank.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:37:58 +00:00
Fabrice Henrion 45bb68db0a [IMP] website_profile: improve wording and fix typos
Manual backport of commit done in master at 20e48b84f8. It is interesting
to have those fixes in 12.2.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:37:55 +00:00
Thibault Delavallée e85c99c145 [FIX] gamification: improve next rank icons
Background of icons should be transparent.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:37:52 +00:00
Thibault Delavallée 026663fb2b [IMP] website_slides: slightly improve demo data
Some addition to demo data, notably some members and a few more slides.
I bet there will be other commits improving demo data, one slide at a time.

Commit linked to task ID 1941250 and PR #31317.
2019-02-21 16:37:47 +00:00
Christophe Simonis 1d2b6f1bef [MERGE] forward port branch 12.0 up to 84143a34b3 2019-02-21 15:37:19 +01:00
Martin Trigaux cdc6b598e3 [ADD] base: Filipino language
As odoo.com is going to be translated in Filipino
Date format source: https://lh.2xlibre.net/locale/fil_PH/

closes odoo/odoo#31276
2019-02-21 13:36:00 +00:00
Hiral BhavsarandMohammed Shekha bb6aec1ac3 [FIX] web: several columns in line chart tooltips for large data
Currently tooltip goes out off the screen when the
graph view (in line mode) presents a large number
of groups.
The present commit splits the tooltip content in
three columns when the number of groups exceeds
20. This split is not done in mobile mode because
it is not an appropriate in that situation.

Co-authored-by: Mohammed Shekha <msh@openerp.com>

Related to Task: 1917958

closes odoo/odoo#30288
2019-02-21 13:03:22 +00:00
Hiral BhavsarandMohammed Shekha 4b652ebe8a [IMP] web: properly display min and max abs when less that 3 abs.
In graph line mode, min and max abs are
displayed beyond the screen when there are less
than 3 abs.
This is happening because nvd3 fixes their
text-anchor to 'middle'. The present commit fixes
correctly their text-anchors to start and end
respectively by using the '!important' rule (it
seems difficult to do otherwise).

Co-authored-by: Mohammed Shekha <msh@openerp.com>

Related to Task: 1917958
2019-02-21 13:01:26 +00:00
Lucas Lefèvre 5da4fa4697 [FIX] hr_skills: Fix skills widget table layout
The three columns in the skills widget (namely: skill name,
skill level and progress) did not evenly span the width of
the table.

This commit set the css width attribute of the first two
columns to 33%. The last column (added by js) takes the
remaining space)

closes odoo/odoo#31326
2019-02-21 12:21:39 +00:00
Jaykishan Solanki 2dd90370cd [FIX] stock: prevent crash if key does not exit in dict
Closes #31049

closes odoo/odoo#31323
2019-02-21 11:49:26 +00:00
Lucas Lefèvre c98dc505d6 [FIX] hr_skills: Set tree mode for widgets in mobile
In mobile, a many2one field is displayed as a kanban view
instead of a tree view.
However skills and resumé widgets have been designed
to work for tree views.
=> traceback when displaying the widgets in mobile.

Fix: force the mode to `tree`
2019-02-21 10:57:13 +00:00
Lucas Perais (lpe) 9fc2420ec6 [FIX] l10n_it_edi: cleaned context default_type
On the accounting dashboard, click on the button
"new invoice" on the customer journal.
Validate the invoice

Before this commit, it crashed because, as always
the key "default_type" was propagated all the way down
to the attachment creation

After this commit, we clean the context from that key
to avoid the problem

Note: There is no clean and safe method to clean
the context from keys only useful to `default_get`
in stable...

OPW 1943439

closes odoo/odoo#31319
2019-02-21 10:06:42 +00:00
Antoine Guenet 4339101afe [IMP] web_editor: add tests for deleting all contents of format block
Implementing new behavior on delete all contents of a format block
revealed insufficient testing, which is now covered.

closes odoo/odoo#31277
2019-02-21 09:13:32 +00:00
Antoine Guenet 2a010c38f3 [FIX] web_editor: remove broken and unnecessary test
The next test was identical to the removed one, with the exception that
it inserts a character at the end, which really is the behavior we want
to test. The removed test was broken because it expected the range on
the parent, which is anyway equivalent in this case. This is confirmed
by the fact that inserting a character at either ranges indeed inserts
the character where it is expected to do so.
2019-02-21 09:13:31 +00:00
Antoine Guenet 00a78af98e [FIX] web_editor: stop removing empty block after deleting its contents
Deleting all the contents of a block node replaced it with a blank
paragraph node. To restore v12 behavior, it should only do that when
pressing backspace in an already empty block, which is now what it does.
2019-02-21 09:13:30 +00:00
Lucas Perais (lpe) 84143a34b3 [FIX] hr: tz on user required in view because of resource mixin
In the user preference, change the timezone of the user to blank (False value)
Save

Before this commit, a cryptic error was raised because the field tz in
resource.resource is required
Note that when writing on res.user, we write some fields (including tz)
on hr.employee, which is a resource.mixin, and therefore uses resource.resource

After this commit, we make the field required in the view

OPW 1934462

closes odoo/odoo#31312
2019-02-21 08:33:26 +00:00
Antoine Guenet 8b8d6d0a5b [FIX] web_editor: do nothing on save if no media was selected in modal
When in the media modal, if one selected no media but clicked the "ADD"
button it resulted in an error and a failed RPC instead of simply
closing the modal without doing anything. v12 behavior is now restored.

closes odoo/odoo#31308
2019-02-21 07:32:38 +00:00
Robot Odoo 5cec06b179 [MERGE] website_slides: various fixes for frontend and first design tweaks
Purpose of this merge is to provide several fixes related to new elearning
application. Those are mainly fixes for front-end templates and first
design improvements / fixes.

See sub commits for more details.

Merge linked to task ID 1941250 and PR #31279.

closes odoo/odoo#31306
2019-02-21 08:49:21 +01:00
David Beguin c2629d114b [FIX] website_slides: add various design and UX fixes
- slidesChannelDropdownSort : dropdown items back to visible (was white on white)
- Featured lesson : change icon to bullhorn instead of + icon
- Pass certification fullscreen button : btn primary
- set max height to fullscreen content to 100% minus header
- Fix 'infographic' slide type image view
- change image for 'Furniture Technical Specifications' course
- fix fullscreen presentation mode: The condition to add the iframe that
  contains the presentation of the document was wrong and, so, never met.
  Those conditions are evaluated in javascript and not in python as it's part
  of t-name template linked to a javascript widget.

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:05 +00:00
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
keylor2906 faf8c41d80 [FIX] l10n_mx: Fix warnings related to wrong fields names on the creation of tax templates for the mexican coa.
closes odoo/odoo#31296
2019-02-20 20:45:51 +00:00