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.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
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
closesodoo/odoo#74237
X-original-commit: 7e9949b9c1e2e98a4d5059de695dbed95751b8b5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#73275
Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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.
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.
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
closesodoo/odoo#73937
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
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
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 ;)
closesodoo/odoo#72599
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
* = 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).
closesodoo/odoo#72597
Related: odoo/enterprise#19224
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#72315
X-original-commit: 6334c7282c19362ca8bc79dbaefe3d38c055e746
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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
closesodoo/odoo#72199
X-original-commit: e412ba4898e35c8519adafb05407bdb78f311c09
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
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
closesodoo/odoo#70083
Related: odoo/enterprise#18225
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
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
closesodoo/odoo#71756
X-original-commit: 3acd0d666af56c39e34fc551e182468cc7bedc42
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
This method only expects to be called as POST and should not be called
with GET.
This commit enforces that.
[CLA] Signature for sushiwushi
closesodoo/odoo#71575
X-original-commit: 00f2eeee7aa514599b40e049be46eacdcc8332fa
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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.
closesodoo/odoo#69819
Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
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
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
closesodoo/odoo#59454
Related: odoo/enterprise#13908
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#64152
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#70763
X-original-commit: 575a524474fe8866cc71b3befc6bbbde8d73075e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#69734
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- 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>
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
closesodoo/odoo#70349
X-original-commit: 26f047633b919bd8f2a260305bfd80e15bf259b6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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>
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.
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>
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>
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
* 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.
closesodoo/odoo#65967
Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
For odoo-master Transifex project, no demo data
closesodoo/odoo#66500
X-original-commit: 813931ac850e5ba4181259a5957ec72226fb670c
Related: odoo/enterprise#16510
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
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>
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>
* 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
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#63499closesodoo/odoo#64313
Related: odoo/enterprise#15688
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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#61545Closesodoo/odoo#63292Closesodoo/enterprise#15585closesodoo/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>
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
closesodoo/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>
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>
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.
closesodoo/odoo#63508
Task-id: 2411211
X-original-commit: 363dcd4e19e88854118e10c11ee2c6bbdf13b537
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>