Commit Graph
1463 Commits
Author SHA1 Message Date
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Julien Banken a03b57a1c5 [FW][FIX] slides: Do not show a traceback when the user provides an invalid video link
PURPOSE:

When the user creates a new content for a course and specify an invalid
video link, the system will display a traceback when the 'onchange' hook
of the field is triggered (i.e: when the user unfocus the field).

Instead of displaying a traceback with the 'Warning' function, we will
rather use the 'UserError' function which is more user-friendly and does
not provide any debugging information.

SPECS:

- Replace the 'Warning' function call with 'UserError'.

LINKS

Task id: 2607238

closes odoo/odoo#74237

X-original-commit: 7e9949b9c1e2e98a4d5059de695dbed95751b8b5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-26 12:15:54 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Xavier Morel 0691736b49 [IMP] website_slides: de-traw-ify
Replace the t-raws used for the end-of-quiz message by t-outs.

This requires marking the two subfields of `quiz/submit` as Markup,
rewrite the method in a more modern style while at it.

Also update the tour to ensure that the message is indeed inserted as
markup, reset the users' karma to a known value to ensure the
motivational message is predictable.
2021-07-20 05:47:26 +00:00
Xavier Morel 0e552b96da [FIX] *: convert tip contents to t-out
Requires markup every markup-using tip content as Markup. Would be a
nice occasion to migrate everything to a markup-safe markdown I think,
especially if we could migrate the translations so we don't lose them.
2021-07-20 05:40:55 +00:00
Julien Banken 8ab2adfbdd [FIX] slides: prevent the # anchors of the PDF controllers from triggering a scroll jump
PURPOSE

Currently, the PDF viewer is loaded from an iframe and the PDF controllers
contains empty anchor links. When the user clicks on one of these links,
the browsers based on Chromium will trigger a "scroll jump" and the iframe
will be placed at the top of the browser window.

When the PDF document is larger than the viewport, this behavior can be
quite annoying: The user will have to scroll the browser window to
see the controllers each time they click on a controller (-> link) as
(1) the controllers triggers a scroll jump and (2) the controllers are
below the document that does not fit entirely on screen. To avoid that,
the links of the PDF controllers will be replaced with spans. The
controllers will then no longer trigger a scroll jump.

SPECS

- Replace the links of the PDF controllers with spans.
- Add css rules to prevent user selection.

LINKS

Task id: 2500574

closes odoo/odoo#73937

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-19 06:54:10 +00:00
std-odoo 97f0f648f1 [IMP] website_slides: open rating composer in fullscreen mode
Purpose
=======
Currently we can write a review in the slide fullscreen view.
But if we click on the button "review", we are redirected to the reviews
page. Instead, we want to open the rating composer and to stay in the
page.

Task-2322583
2021-07-16 11:18:11 +00:00
std-odoo db7b15988b [IMP] portal: allow better customization of the portal rating composer
Purpose
=======
Add a new option on the portal rating composer, "hide_rating_avg" in
order to hide the global rating on the button and allow to fully
customize the button. Also allow to customize the text style and to
add an icon on the button.

Add the dependency "portal_chatter.xml" from portal rating on the portal
composer Widget. It already has the dependency "portal_chatter.xml"
from the simple portal module, but because the second file was not in
the dependency, the view was not inherited if we add the widget in a
fullscreen view.

Task 2322583
2021-07-16 11:02:41 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Jeremy Kersten 478068c829 [IMP] *: always use Odoo Response
This branch adds request.redirect on all requests.
In case of a front end request, we do an url_for to the location.

We removed redirect_with_hash that was only for retro compatibility

local_redirect has been renamed to redirect_query, and param keep_hash has been
removed and moved.

Default code for redirect is 303 now instead of 302.

Now redirect and redirect_query make local redirect by default, you need to
pass local=False to make external redirect.

All werkeug.utils.redirect has been replaced by request.redirect.

Http.redirect now use an http.Response type, and it become easy to add an
override like 'set_cookies' e.g.

Dispatch of a website.page return an http.response too, so we first need to
check if it is a cached version before to check if it is an Odoo Response.

Migrate your code:

http.redirect -> request.redirect(location, code, local)
http.local_redirect -> request.redirect_query(location, query, code, local)
http.redirect_with_hash -> request.redirect

Courtesy of odony for help and review ;)

closes odoo/odoo#72599

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-08 07:00:06 +00:00
Didier (did) 6240617358 [IMP] mail, *: use explicit export instead of default
* = hr, hr_holidays, im_livechat, sms, snailmail, website_livechat,
    website_slides

Exporting directly on the line of the class or variable definition is less lines
of code and less repetition (and risk or mistake).

Exporting with a name instead of default allows to catch typos more easily when
importing and ensures the same name is used for consistency (and ease of grep).

closes odoo/odoo#72597

Related: odoo/enterprise#19224
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-25 14:56:52 +00:00
Fabien Pinckaers a65f6a5872 [IMP] various: clean most urls to odoo's website
Pages changed on odoo.com so let's update links.

closes odoo/odoo#72707

Related: odoo/enterprise#19239
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 15:14:29 +00:00
Nicolas Lempereur 4aa89f146e [FIX] website_slides: can edit frontend enroll message
The frontend enroll message was display as a `<small/>` tag, but it
seems that lxml HTMLParser parse it wrongly, for example:

  html.tostring(html.fromstring('<small data-oe-model="test"><p></p></small>'))

returns:

  '<div><small data-oe-model="test"></small><p></p></div>'

So branding attributes like data-oe-model that are on small tag are not
found on root node that has become a `div` tag after parsing => this causes
a traceback error when saving a change in this part.

Fix: use small as wrapper for `<div/>` tag that is treated correctly by
HTMLParser (span is also treated correctly but div makes more sense
here).

opw-2573955

closes odoo/odoo#72315

X-original-commit: 6334c7282c19362ca8bc79dbaefe3d38c055e746
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-06-17 18:37:44 +00:00
Djamel (otd) ff29ec7064 [FIX] website_slides: hide the "Go to website" button if the slide is not saved
Steps to reproduce the bug:
- Go to Elearning > choose any course or create a new one
- Click on “add content” :
    - Add a title to slide
    - Click on "Go to Website"

Problem:
An error is triggered because we call the "create" method to save the slide, which tries to access the “channel_id”, the course ID in which the slide will be added. However, the field is not set in values.
The "create" or "write" function in "slide_channel" must first be called to save the course, which will then call the create function in "slide_slide"

Solution :
Hide the "Go to website" button as long as the course is not created and therefore has no id

opw-2526541

closes odoo/odoo#72199

X-original-commit: e412ba4898e35c8519adafb05407bdb78f311c09
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-06-15 18:31:14 +00:00
Munaf Khan 292ffeec00 [FIX] various: avoid scroll for button(s) within mail templates
Right now, for notifications handled by odoo (which are being displayed on
discuss app / object chatter), few of the buttons have unexpected scroll
(mostly the CTAs that redirect to record / portal views) and ruins the UI.

This commit fixes the issue by improving such templates by using proper
paddings on the button.

TaskId:2518863

closes odoo/odoo#70083

Related: odoo/enterprise#18225
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-15 08:34:37 +00:00
dht-odoo b8fb33817b [IMP] website_slides: improves field type from text to html
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).

Models -> Fields

1) slide.channel -> description
2) slide.channel -> description_short
3) slide.slide -> description

Task Id: 2499504

X-original-commit: 6d914c005183aa5ae69650e3002a5a85ca83b4a6
2021-06-07 05:24:08 +00:00
Djamel (otd) d6c409444d [FIX] website_slides: set PdfFileReader to strict=False
Steps to reproduce the bug:
- Go to elearning app > Courses > content
- Create new slide > Upload a PDF file with faulty content

Problem :
Pypdf2 throws errors because it does not support some content or syntax.
In our case we are just trying to get the number of pages in the PDF, so if we put `strict = false`
we just determine that the user should not be informed of all the errors that pypdf2 encounters,
the flag `strict` is not a security indicator.

FYI: https://pythonhosted.org/PyPDF2/PdfFileReader.html
``` strict (bool) - Determines whether user should be warned of all problems and also causes some correctable problems to be fatal. Defaults to True.```

opw-2530829

closes odoo/odoo#71756

X-original-commit: 3acd0d666af56c39e34fc551e182468cc7bedc42
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-06-04 13:33:25 +00:00
fw-bot de5be74db5 [FIX] website_slides: allow to use only in POST
This method only expects to be called as POST and should not be called
with GET.
This commit enforces that.

[CLA] Signature for sushiwushi

closes odoo/odoo#71575

X-original-commit: 00f2eeee7aa514599b40e049be46eacdcc8332fa
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-06-01 17:22:18 +00:00
Romain Derie 92175d3341 [IMP] *: replace web.base.url ICP by helper method
Previous commit introduce an helper to get the most suited URL for a record
instead of always using the ICP, which is not correct in a website context.

This commit replaces calls to ICP by the helper method.

Community: https://github.com/odoo/odoo/pull/68201
Enterprise: https://github.com/odoo/enterprise/pull/17538
Upgrade: https://github.com/odoo/upgrade/pull/2372

task-2476101
2021-06-02 10:04:29 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Thibault Delavallée bfbd42c5f4 [FIX] survey, website_slides: make invite coherent and improve templates
In this commit we fix some glitches in slide invite process

  * prevent from sending without recipients as it makes no sense;
  * hide Invite link in kanban like Invite button on form view, when not
    being invite-based;
  * fix small issues in various templates, notably escaping in subject;

Task ID-2534550 (Template usage improvement)
Task ID-2477164 (Composer mixin)
COM PR odoo/odoo#70889
2021-06-01 09:06:07 +00:00
Stéphane Debauche 300a79c738 [IMP] website_slides: use new mail.composer.mixin
Using this mixin allows to hide details about jinja-based computation for
main fields used when posting messages or sending emails. Notably subject
and body computation that was duplicated in several addons are now done
in a mixin. It also eases their maintenance or evolution when qweb rendering
will be available. It also eases support of lang when necessary.

Task ID-2534550 (Template usage improvement)
Task ID-2477164 (Composer mixin)
COM PR odoo/odoo#70889
ENT PR odoo/enterprise#18352
UPG PR odoo/upgrade#2496
2021-06-01 09:06:07 +00:00
Mohammed Shekha ccc56e28a3 [IMP] *: replace fa-spinner with fa-circle-o-notch
Slightly improve the overall UI of Odoo with a more modern feel by updating the
current 'loading' icons that look quite old school.

Use fa-circle-o-notch instead of old style fa-spinner

task-2346142

closes odoo/odoo#59454

Related: odoo/enterprise#13908
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-21 11:48:32 +00:00
Aurélien Warnon e1b1733c03 [FIX] website_slides: close fullscreen mode when opening web editor
The web editor does not work well with the e-learning fullscreen view.
It actually completely closes the fullscreen view and opens the edition on a
blank page.

To avoid this, we intercept the click on the 'edit' button and redirect to the
non-fullscreen view of this slide with the editor enabled, whose layout is more
suited to edit in-place anyway.

A small testing tour was added to ensure this behavior is kept.

Task-2507179

closes odoo/odoo#71086

X-original-commit: 8009e6fedb78e7c16764faef77459614c7ff5ed2
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-20 09:54:04 +00:00
Anjali d70af67954 [IMP] website_slides: show relevant info while viewing partners' courses
Currently, when you click the stat button "x Courses" on a contact, you land
on the dashboard of the courses that this user follows. But this information
in not much useful here. You'd like to see information like progress of this
member for each courses, or when the member was last active on a specific
course.

With this commit, when you click the 'x Courses' stat button from a contact,
you will see the list view of model 'slide.channel.partner', having the
default filter for the contact from which you clicked the button. This will
show the additional and relevant information you need, and by removing the
filter, you'll be able to see info about all the attendees and their progress
on courses they follow (Note that here if the partner is a company, you
won't get default filter set but the records will be filtered by domain,
because we need to show courses of current contact and it's children, and
so we have to set domain in action, instead of adding default filter in
action context).

The same way, on the Attendees View of a course (when seeing attendees from the
course dashboard), we add 'Last Action' field, and instead of fixed domain, we
use filter to view attendees of a particular course, removing which can allow
us to view information about all the attendees from all courses.

We also introduce new 'Attendees' menu under 'eLearning > Reporting' that will
show information about all the attendees from all courses, with a default group
of channels

Task Id-2409447

closes odoo/odoo#64152

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-17 09:12:26 +00:00
Julien Banken 1ba6312f29 [FIX] slides: Verifying the returned value of re.search before accessing the capture groups.
The `search` function of the `re` package can return `None` if the
provided string does not match with the provided pattern
(https://docs.python.org/3/library/re.html#re.Pattern.search).

On the `_parse_youtube_document` function of the `slide.slide` model,
we are directly accessing the capture groups from the returned value
of the `search` function without checking that the returned value is
actually a 'match' object. As a result, an exception can be throw if
there is no match as, in that case, the `search` function will return
`None` and the `group` function will not be defined on `None`.

To avoid throwing an exception, we will check that the returned value
of the `search` function is not `None` before accessing the capture
groups via the `group` function.

LINKS

Task id: 2525007

closes odoo/odoo#70763

X-original-commit: 575a524474fe8866cc71b3befc6bbbde8d73075e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-12 15:02:41 +00:00
Martin Trigaux 41d8b8cf68 [I18N] *: export saas-14.3 source terms
closes odoo/odoo#70673

X-original-commit: bcb9ff784e44462384b0a43a0a23eed7a1111bc5
Related: odoo/enterprise#18269
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-11 12:28:28 +00:00
Jérémy Hennecart dd98184c43 [IMP] website_slides: remove the automatic creation of link trackers
Before, each time the name of a slide was modified then a new link
tracker was created.

After discussion, we agreed to remove the automatic creation of link
tracker and let the user creates it manually if he really wants one.

The slides already have a lot of statistics that can be used without
the need of a link tracker.

task-2511961

closes odoo/odoo#69734

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-23 09:50:43 +00:00
dht-odoo 12469ef4d3 [IMP] various: improve the sequence of menu items
- Currently all menus are out of order in app switcher.
- For example, Sales app is 16 menu away from Accounting,
  Social Marketing app is 25 menu away from Email Marketing, etc.
  So, all menus should be reordered.

- This commit will reorder the menus of the app switcher in order to reduce
  the distance between correlated applications,
  and bring the most common apps upward.
- And in this commit we have left gap of 5 subsequent sequence for further new menus.

PR: #69984
TASK ID: 2513082

Related: odoo/enterprise#17989
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 05:54:18 +00:00
Philémon van Helden 542618db8e [FIX] website_slides: correctly shows 0 XP on completed unpublished quiz
In 13.0 and above, when looking at a quiz that was completed while not published, it would incorrectly show 2 XP awarded, when 0 XP should be awarded.
With this commit, we show instead the correct 0 XP awarded.
opw-2480343

closes odoo/odoo#70349

X-original-commit: 26f047633b919bd8f2a260305bfd80e15bf259b6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-05-04 15:41:09 +00:00
Jorge Pinna PuissantandSamuel Degueldre 9a76719893 [FIX] *: undeclared variables and restricted globals
closes odoo/odoo#69988

Related: odoo/enterprise#17991
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-05-04 13:32:49 +00:00
Jorge Pinna PuissantandSamuel Degueldre f43a0814ae [IMP]*: configuration of ESLint for specific files
This commit will add the needed ESLint configurations on the JS files.
These configurations are added if the JS file uses a different
environment (serviceworker, node, etc) or if it uses a specific global
(google, ace, etc).

Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-05-04 13:32:49 +00:00
Xavier Morel 369075fefb [FIX] website_slides: de-raw-ify
Convert `embed_code` to a computed HTML field so it's considered markup-safe.

It needs to be sanitize=False because we're putting <iframe> elements
in it. Those get stripped by sanitize.
2021-04-29 05:34:20 +00:00
Qiuyu (QHO) bd67479316 [REF] mail, mail_bot, im_livechat, *: convert JS files to ES6 modules
task id: 2487514

closes odoo/odoo#69376

Related: odoo/enterprise#17749
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-19 13:33:35 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Julien MougenotandSimon Genin ebe86f5ca5 [REF] web,*: Flatten _assets_helpers
Before this commit, the asset bundle "_assets_helpers" was the only
bundle using a "t-raw" directive to insert assets in between other asset
calls.

Now _assets_helpers only contains the assets called before the t-raw
directive, and the second part (1 file actually) has been added after
every call of the bundle.

This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:17 +02:00
Qiuyu (QHO) c3ae559bf7 [IMP] mail, *: replace [] commands by FieldCommands
closes odoo/odoo#67643

Task-id: 2453408
Related: odoo/enterprise#17036
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-23 12:51:24 +00:00
std-odoo bdb09107d0 [REF] website_slides: split computed editable fields
Purpose
=======
Some computed stored editable fields are computed in the same method.

In that case, when one of the value is provided in a create / write call,
the computed method is not called and other fields computed in the same
method do not have the right value.

Task 2377119
COM odoo/odoo/pull/65772
ENT odoo/enterprise/pull/16221

X-original-commit: c37ff784f2195325d770e41c70e24a0d1d0420c7
2021-03-05 11:54:14 +00:00
Michael Mattiello (mcm)andged-odoo 7086488064 [REF] web, *: remove patchMixin + imp utils.patch
* hr, hr_holidays, im_livechat, mail, snailmail, website,
  website_livechat

This commit removes `patchMixin` and improve `utils.patch`.
`utils.patch` now supports native classes and has a new parameter
used to patch class members.

`utils.patch` is now used everywhere `patchMixin` was and it must
be used to patch classes.

closes odoo/odoo#65967

Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
2021-02-26 10:39:21 +00:00
Martin Trigaux 9741ef5ee6 [I18N] *: export saas-14.2 source terms
For odoo-master Transifex project, no demo data

closes odoo/odoo#66500

X-original-commit: 813931ac850e5ba4181259a5957ec72226fb670c
Related: odoo/enterprise#16510
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-19 08:02:58 +00:00
Thibault Delavallée 3a608fea32 [IMP] website_slides: add demo data for documentation channel
Purpose is to have some data in a documentation channel to see a bit
how they behave compared to training channels.

LINKS

Task ID-2275688
PR odoo/odoo#65454
2021-02-11 16:07:28 +00:00
Mariska ArchielliandThibault Delavallée 994cc3f5e6 [REF] website_slides: better integrate documentation and training channels
Purpose of this commit is to lessen difference in layouting between courses
being documentation or training. Indeed we want a smoother user experience.

In this commit we

  * use the left bar with course information on course page view on both
    courses;
  * unify menus and tabs;
  * better integrate sale and forum as everything is not a single layout;
  * move Type under Display to have all display related options within the
    same option group;
  * unify display, notably remove "+" on "+ Add Tags";

LINKS

Task ID-2275688
PR odoo/odoo#65454

Co-Authored-By: Mariska Archielli <ram@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2021-02-11 16:07:27 +00:00
Thibault DelavalléeandMariska Archielli 7cba785900 [IMP] website_slides: allow to see document slides in fullscreen
Allow documentation lessons to be seen in fullscreen mode. Default mode
is still the slideshare-like one but fullscreen is now available. This
imply notably computing category data in both modes to enable fullscreen
support and course lessons navigation.

LINKS

Task ID-2275688
PR odoo/odoo#65454

Co-Authored-By: Mariska Archielli <ram@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2021-02-11 16:07:27 +00:00
Michael Mattiello (mcm) 785b304876 [IMP] *: reduce shift in form views (xml)
* account, analytic, calendar, coupon, crm, crm_iap_lead_website,
  delivery, digest, event, event_crm, fleet, gamification, hr,
  hr_expense, hr_skills, im_livechat, lunch, mail, maintenance,
  mass_mailing, membership, mrp, point_of_sale, pos_mercury, product,
  purchase, purchase_requisition, sale_management, sales_team, sms,
  stock, stock_landed_costs, survey, website_crm_partner_assign,
  website_event_exhibitor, website_event_track, website_forum,
  website_slides, base

This commit removes oe_edit_only labels and adds placeholder
on fields in form views from a lot of apps to minimize the
shift when switching mode.

task 2330101
2021-02-02 12:40:22 +00:00
Romain Derie f2583f3de4 [IMP] website(_*): prevent wrong multi website access during dispatch
Before this commit, routes were prevented to be accessed if the route model was
not accessible from the current website, eg you couldn't access blog1 which is
set to website2 from website 1.
That would raise a 404 even from admin/editor.

This commit introduce that behavior at a lowel level in a generic way, instead
of having to write it on every route.

Note that routes without a model converter won't benefit from this.

Closes #63499

closes odoo/odoo#64313

Related: odoo/enterprise#15688
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-01-25 11:01:13 +00:00
Xavier Dubuc d575cfb3c1 [FIX] website_slides: remove no more useful old activity overrides
task-2429670

closes odoo/odoo#64341

Related: odoo/enterprise#15674
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-01-19 11:43:47 +00:00
Achraf (abz)andThibault Delavallée f5adb5b25d [FIX] mail: send notification mail with right access link when using mail.thread
PURPOSE

Notification may be sent using a generic mail.thread record, notably when
sending user notifications. In that case links to view document are
incorrect.

HOW TO REPRODUCE

Issue

    - Install "Approvals"
    - Submit new approval with you as "Request Owner"
    - Click on "View Approval Request" in your mailbox

    The link redirects to a 505 error

Cause

    The model is not the correct one and the res_id is undefined

Solution

    Specify the model and the res_id to _notify_get_action_link
    when creating the link with kwargs

SPECIFICATIONS

Propagate message value through various notification sub methods. That way
we can rely on them if model seems void.

Also limit values given as URL parameters to some white listed values.

LINKS

opw-2358846
Task ID-2379766
Followup of odoo/odoo#60998
Followup of odoo/odoo#61545
Closes odoo/odoo#63292
Closes odoo/enterprise#15585

closes odoo/odoo#64229

X-original-commit: 58bac5d242d6548d54f0163328fa64b319852e40
Related: odoo/enterprise#15634
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Achraf Ben Azzouz <abz@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2021-01-07 17:44:37 +00:00
Achraf (abz) 7c7822bd7d [FIX] website_slides: Complete courses with video
What are the steps to reproduce your issue ?

    1. Install ELearning
    2. Create a course
    3. Add a video from youtube
    4. Attempt to do the course from a user that is invited

What is currently happening ?

    You cannot complete a video (turn the checkmark green) if there is not a quiz. Therefore you cannot complete the course

What are you expecting to happen ?

    Turn the checkmark green to signify that video is completed after watching the video and then have the ability to complete the course

Why is this happening ?

    Because of this commit https://github.com/odoo/odoo/pull/61581/files
    that changes 'youtube.com' to 'youtube-nocookie.com'

How to fix the bug ?

    Remove host

opw-2418545

closes odoo/odoo#63878

X-original-commit: 484957caf89e0f324dffda6f2ac0a1ca543b969b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-12-29 11:29:08 +00:00
ijas ahammed 5e59ced9ca [IMP] website_slides: separate backend tags from frontend tags
Backend tags are generally used internally for classification or daily
process. Frontend tags are used for filtering and menu definitions. These
two type of tags are not managed separately in eLearning channels right now.

This commit separates backend and frontend tags using the color field.
Along with that, it improves the following :

Frontend

 - only displays channel tags that has color set;
 - avoids showing void tag group / menu (without any frontend tags);

Backend

 - prevents access of the backend tags for portal/public users with a
   record rule (similar to online events);
 - adds 'Tags (tag_ids)' field in the list view of 'Course Groups' that
   shows all the tags (frontend as well as backend);
 - hides the colorless tags in slide channel kanban;
 - improves the form view for course channel tags;

Frontend and Backend

 - adds a default color value while creating a new channel tag

Task ID-2357942
PR odoo/odoo#62138

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-23 14:49:28 +00:00
Lavish Chhatwani 3df926b30b [FIX] websites_slides: remove active test from context
Before Commit :
-when user archive a course content, it's still visible
 on the course itself, without real difference between
 active content and archived. it was confusing.

After Commit :
-now when user archive a course content, it's not visible
 anymore on the course.

closes odoo/odoo#63508

Task-id: 2411211
X-original-commit: 363dcd4e19e88854118e10c11ee2c6bbdf13b537
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-17 10:42:22 +00:00