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>
With this commit, all instances of errors being raised inside
`BaseModel.unlink` overrides are moved into methods decorated with
`api.ondelete` which is safer.
- use a default scale when the viewer is shown, to fit the document to
the available space
- avoid using CSS scaling on the canvas, as this makes the output blurry
- add some zoom controls in the viewer
- fix CSS class for icon on the full-screen toggle (this toggle was
previously not displayed because of it)
- move download button left (to avoid overlapping with "Chat with Us"
box on odoo.com)
opw-2389716
closesodoo/odoo#62836
X-original-commit: 0247a94f252186aae33f5f137021fa04747fa2fb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
1) in this commit, improved portal chatter for messaging. when the user sends a
message, the new message is updated in history without reloading page.
instead of submitting a form which reloads page to send message we added rpc call
to send message.
2) rating on courses is implemented by extending portal chatter, applied changes in
website_slides to do reviews without reloading page
3) refactoring: cleaned or removed code
eg. removed form and some input fields as data is not submitted as form anymore,
introduced some methods to avoid duplication of code
task-2054662
Closes https://github.com/odoo/odoo/pull/47746closesodoo/odoo#47746
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
Co-authored-by: ktr-odoo <ktr@odoo.com>
Co-authored-by: Siddarth Gajjar <sga@odoo.com>
- Install website_slides
- Connect with an user (i.e. Mitchell Admin)
- Go to Website and open a Course quiz for the first time
(i.e. "Test Yourself" from "Basics of Furniture Creation" Course)
- Answer correctly
The number of won karma is the one from the last attempt reward and is not saved
in user's total xp.
When submitting the quiz, quiz_attempts_count is incremented via a SQL query,
but its value is not updated in cache directly.
When the karma gain is computed from the attempts count, the value used is the
old one in cache.
opw-2389969
closesodoo/odoo#62500
X-original-commit: d8254c130d4b04a0f1ff80990fe28e795bf9ad51
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Before, on request by groups, now we use a variable is_system / is_designer
to make only once the request.
closesodoo/odoo#62313
Related: odoo/enterprise#14970
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
PURPOSE
Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.
SPECIFICATIONS
* move those templates in their own file to ease their discovering and
maintenance;
* put them into data (as those are not views even if it contains qweb)
* guidelines are now :
-> Qweb templates should be in data/mail_templates.xml;
-> mail.template records should be in data/mail_template_data.xml;
* put their declaration in no update when not done if template has no
technical code or complex dependency on underlying code;
* move found mail data (mail.message.subtype or mail.activity.type) records
in a mail_data file that should contain only "core" records linked to mail;
LINKS
Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#1936
Same change in several areas where translations existed:
- website editor notification popup
- elearning share popup
- forum remediation filter popup
- event registration attendees popup
- portal rating popup
- stripe payment error popup
And many other locations where there were no translations yet
"×" has been replaced by its UTF8 character.
Also introduced aria-label where missing.
Before this commit the close icon was included in translated resources.
For example, in Spanish the "×" had been turned into "&veces;"
thus not rendering an icon anymore
After this commit the close icon is not a translated text anymore and
remains an icon across all languages
https://github.com/odoo/odoo/pull/60186
task-2312878
closesodoo/odoo#62250
X-original-commit: 9896af94ebc887d98ccf44e6568ef7eeb5a27172
Related: odoo/enterprise#14937
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Due to recent legal changes in EU, you cannot install tracking cookies in a user's browser without explicit consent.
Before this patch, Odoo embedded youtube videos were violating that law (AFAIK & IANAL).
With this simple patch, you benefit from YouTube's offering to embed videos without cookies. The UI remains the same, but no tracking is done.
@Tecnativa TT26153
closesodoo/odoo#61828
X-original-commit: a1a1169f28233b69cd70d01621d605b36517ac73
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
This commit fixes the behavior of archiving and un-archiving slide.channels.
SPECS
When archiving a slide.channel, you could run into an issue where the
associated slide.channel.partners would be marked as "completed" even though
the related slides were NOT completed by the user.
This happened because when computing the completion, it's searching for
slide.slide.partners marked as completed, and then comparing it with the count
of slide.slides in the channel, which would always return 0 since all slides
are archived when the channel is archived.
Marking channels as completed when they should not triggers undesired
side-effects (karma increase, completion email sent, ...).
Now, when the slide.channel is not active, we don't mark associated
slide.channel.partners as completed anymore.
The ordering in which we archive channel and slides was also altered, see
method docstring of 'slide.channel#toggle_active' for more info.
A new test ensures the correct behavior of archiving.
LINKS
Task 2170708
closesodoo/odoo#61773
X-original-commit: f7795f85ed66fcebaf8a96bf4e550b069fcf1e83
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
PURPOSE
Fix the 'multi' behavior when sending completion emails for slide.channels.
SPECS
There was a typo in the 'slide.channel#_send_completed_mail' method that
prevented it from correctly working in "multi" mode.
A new test was introduced to ensure the fix is working.
LINKS
Task 2170708
closesodoo/odoo#61004
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit when searching channels based on tags URLs were generated
like `/slides/all?tags=%5B4%5D`. This is not very clean, especially when
people share links.
In this commit we move to a slug-based URLs generation and support. URLs now
look like `/slides/all/tag/basics-1,gardening-2` which is more readable and
user friendly.
Support of all tags is maintained: `/slides/all?tags=%5B4%5D` still work
and display the same as `/slides/all/tag/basics-1,gardening-2` to ensure
links still work after applying this patch.
Along with this improvement this commit also improves the behavior of tags
for bot indexation. This is inspired by website_blog[1].
Task ID-2267840
Closes#53621
[1] - https://github.com/odoo/odoo/commit/0f2cada32319b3910d6ace6d412cfa94a646c9c7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus
WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:
When saving, a read is called. By default, read has
bin_size to true to avoid performances issues.
It will return the image size instead of the content
it may lead to image dissapearing or "Incorrect padding" error
HOW:
find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
git checkout -- addons/base_setup/views/res_config_settings_views.xml
---
PR for General Settings: https://github.com/odoo/odoo/pull/47297
opw-2346644
closesodoo/odoo#61215
X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
This commit makes a small adjustment to the course view to hide the responsible
label in the course description if none is set.
As this field is not required on the slide.channel model, it's not necessary to
show a useless label when it's not set.
Task 2368573
closesodoo/odoo#60611
X-original-commit: 7114e13736d41f2350b14367704bf14c23cf9c0d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
This commit fixes a small issue with the modal displayed when the user wants to
manage his subscription to a course.
When pressing the "Save" button, if no modification was made, the modal would
not close and nothing would happen (which seems strange on a user POV).
Now the modal correctly destroys itself and closes.
Task 2363028
closesodoo/odoo#60507
X-original-commit: 32d0b1086b5db6c58c1e2891d8d77fafb9482de9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
We have a new feature that if the course is private, and attendee make the
request to access the course it will create an activity for 'course responsible'.
Currently, after accepting the invitation request from the new user, it is still
not considered the user as an attendee and not displaying like 'You're enrolled'
to the respective users
After this commit:
The features of access invitation on courses will be workable.
Task-2328389
closesodoo/odoo#60135
X-original-commit: becf051f38fcf08d4a0aea758cb2758ad0f25bc3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since a refactoring of the handling of the color system and the way the text
muted is handled, the text-muted isn't visible on the full-screen mode of a
course. That is becuase text-muted is based on the font color set for the body,
which in this case is quite similar to the background of left panel in
full-screen course content.
This commit fixes the issue by using `text-600` class that is suited for this
scenario (the background color is fixed here irrespective of the color-palette,
and so should be muted text-color) instead of `text-muted` for the left panel
of full-screen course content.
taskId - 2346013
closes#59390closesodoo/odoo#59970
X-original-commit: 7f7f9c6c9165fc6697e90ed6616466d9684e28f2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Issue
- Install "Elearning" module
- Activate "Drive" credidentials in settings
- Go to any course and edit it.
- In "Content" tab, click on "Add Content"
- Select `Video` as 'Type'
- Copy/Paste the Google Drive video link in "Document URL" field
- Wait for other field to be computed then "Save & Close"
- Save the course
- Go to the website to watch this new content
Youtube error message
Cause
'mime_type' field is readonly. When saving the course (slide.channel),
the slide is not saved yet, and therefore drop the 'mime_type' value.
When generating the `embed url`, it verify if a mime_type is set: if not,
it will generate an iframe with youtube.com as domain, else,
a drive.google.com domain.
Solution
Add `force_save="1"` on `mime_type` field.
opw-2294344
closesodoo/odoo#59917
X-original-commit: 987b9bf408cf5ba2deded7e2015caa6faeb65a87
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
- Prior to this commit, slide content of type document or presentation is
having src as '/slides/embed' and that controller tries to set slide as
viewed. Along with this, for few slide types (including document and
presentation) and for logged in user, it will try to set slide as completed
once slide rendering is done with help of method `_setCompleted`, without
waiting for the iframe to be loaded. This means, the controller called from
the src of iFrame and the above method both tries to update same 'slide_slide'
table at the same time, resulting into concurrency error.
- This commit fixes the issue by marking the slide as completed (with help
of method `_setCompleted`) only after the iFrame is loaded, avoiding the
concurrent updation of 'slide.slide' table.
TaskID 2265863
Closes https://github.com/odoo/odoo/pull/52918closesodoo/odoo#59391
X-original-commit: c5f406c8cbf43c56939cee054f9b911fe3933b3b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Including demo data this time
closesodoo/odoo#58862
X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
*blog, forum, slides
Based on https://github.com/odoo/odoo/pull/48552#discussion_r440061218 suggestion
Add a new method 'increment_skip_lock' in tools.sql to allow to easily
increment a specific field of 1 if the record is not locked.
The method return boolean if at least 1 record has been incremented.
closesodoo/odoo#58765
X-original-commit: d92e61e89f468c2db2fbd68b2f0d6b36c77f1065
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Bug
===
You can enter in a fullscreen mode in the frontend, of the slide channel.
In this view, the default website header should not be visible.
To do that, we play with z-index, but since 0f2cab4aeb ,
the z-index of the website header has been changed without changing the z-index
of the fullscreen view.
Task-2345016
closesodoo/odoo#58483
X-original-commit: 8d35540df6d21af6fe716f73aefa37bfb66c7ac2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since a recent refactoring[1] is merged, few compute methods are being
called at record creation, and throws traceback because of newID.
This commit fixes the traceback by improving the compute methods and
thus enable users to create records of slide contents and forums.
Note - compute fields should be assigned a value, and so we update
the recordset with default values while creation. See below PR for
more information.
[1] - https://github.com/odoo/odoo/pull/55995
Task - 2325605
closesodoo/odoo#58196
X-original-commit: a677859a03c86bf6ac791c31f52ce8609bcba594
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Mainly transifex issues but also some errors found through 'grep' checks.
Fix typos and obscure english strings in xml contents, fields strings/helps, some docstrings, ...
ensuring correct translations base (and fallback when translations isn't available).
closesodoo/odoo#57276
X-original-commit: 4214f05d454bca2b60fda3a288d529c098e84f77
Related: odoo/enterprise#13053
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>