The origin parameter must be an absolute link (starting with a /)
To be consistent and always have a leading slash (and avoid relative
links if the developer forgot to add a leading slash)
Purpose
=======
This commit improves the front-end when we have no leaderboard yet
Specifications
==============
It hides the `Show All` button when we have no leaderboard.
It also modifies the leaderboard view if a user manages to get to it.
task-2597345
See odoo/enterprise#20480
See odoo/upgrade#2784
Part-of: odoo/odoo#75646
Before Odoo saas-14.4, one should call `_get_http_domain()` on website to get
its domain. Indeed, that method was in charge of cleaning that domain, as it
was done with commit [1].
Since Odoo saas-14.4, that cleaning is automatically performed on domain before
saving it into database, thanks to commit [2].
Thus, we can now remove the `_get_http_domain()` and use directly the domain as
it is considered clean.
Note that migrated databases coming from version older than Odoo saas-14.4
could still have an incorrect domain (trailing slash, no scheme..).
This will be handled during migration with [3].
[1]: https://github.com/odoo/odoo/commit/3ad775aab717b395a5d11527aeb3596af66afa99
[2]: https://github.com/odoo/odoo/commit/042c95b0219bb0aa13e73385e092fa76ff1a1b0a
[3]: https://github.com/odoo/upgrade/pull/2951closesodoo/odoo#78766
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Purpose
=======
Clean up messages related to email verification.
Specification
=============
Rephrase messages, add confirmation of email sent and let user change
email.
Do not show "Validation Email sent" if the current user changed their
email address.
PR: https://github.com/odoo/odoo/pull/77617
Task-2647065
closesodoo/odoo#77617
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.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>
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>
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>
Steps to reproduce the problem:
* Set up multi company with A and B companies
* Set up user UB connected to B company
* Wet up website to company A
* Install eLearning app
* on the /profile/ranks_badges page with user UB the text writes: "Keep
learning with B. Collect points on the forum ...".
This is wrong, as the website is connected to company A. The text should
closesodoo/odoo#58098
Be: "Keep learning with A. Collect points on the forum ..."
X-original-commit: 0d58423f6180fea908fc747e874798ce4aeadd92
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
PURPOSE
Overall improve profile related parts of eLearning user experience.
SPECIFICATIONS
Improve display and the text about the karma gain/rank
- remove the double quotes around the rank
- change the text after the xp gained in rank list
- rename Monthly / Weekly gains to this month / this week
Improve the margin between questions and questions categories
- set same margin between questions in different categories
LINKS
Task ID-2241513
PR #55698
This commit add a breadcrumb in the badge frontend view to redirect
to the last page the user was.
It highlights the user profile line in ranking view (profile/users).
It add this line at the top of every pages except for the one where
it already was.
Part of https://github.com/odoo/odoo/pull/46634
task-2201708
Before this commit, if no image was set on the badge, no image was shown when
displaying the badge.
After this commit, if a badge level is set on the badge and no image is set,
the badge level image will be used for the badge.
This fix / improvement is applied twice
* when displaying an user profile, its received badges;
* when displaying current user achievements in eLearning;
Task ID 1981399
PR #43577
- A tag has been added next to the title of each tab in the profile when the user come from a specific forum. The goal is to indicate to the user that the displayed content is specific to a given forum. The tag can be clicked by the user to remove the applied filter.
- Change label in edit profile page from "real name" to "name"
Task Id: 2214425
closesodoo/odoo#48665
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Before this commit when an administrator edit another user's profile it
was his own data that displayed for the changes.
This commit fixes this issue.
SPECIFICATION
Add a test in both controller route when displaying the edit view and
when submitting the changes that check if the edited user is the same
as the actual user.
LINKS
Task ID : 2222043
PR : #48262closesodoo/odoo#48575
X-original-commit: 4ab4de5b57a17002d8b14584c7d39a29e8bca357
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fix most `t-set` errors that either led to:
1. unwanted text to be considered as translatable.
eg: `<t t-set="classes">text-left bg-100 p4</t>` would create an
`ir.translation`.
2. text that should be translatable were not.
eg: `<t t-set="text" t-value="'Both'"/>` would not create an
`ir.translation` while it should.
If a text should be translatable, it should never be inside a `t-value`:
- `<t t-set="text">Both</t>`
If a text should not be translatable, it sould either be inside `t-value`,
`t-valuef` or the `<t>` tag should have `t-translation="off"`:
- `<t t-set="classes" t-translation="off">text-left bg-100 p4</t>`
- `<t t-set="classes" t-valuef="text-left bg-100 p4"/>`
- `<t t-set="classes" t-value="'text-left bg-100 p4'"/>`
https://github.com/odoo/odoo/pull/43660https://github.com/odoo/enterprise/pull/7839https://github.com/odoo/design-themes/pull/203closesodoo/odoo#43660
Related: odoo/enterprise#7839
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit adds a section to distinguish the certification badges from the
other badges users may obtain in eLearning. Certification badges are available
on the ranks page, linked to a running survey. Clicking on them directly
redirects into the linked course.
Task ID : 1961053
PR #32594
In this commit we rename stat_count into granted_count, and stat_count_distinct
into granted_users_count to reflect more what are those variables, aka count
of granted badges.
Task ID: 1961053
PR #32594
Purpose is to support both search term and karma gain group by in the
URL, using keep_query.
Clean some code and move karma computation to res.users model to avoid
having sql in controllers.
Also fix some display issues.
LINKS
Task ID 2003505
PR #34594
PURPOSE
Allow karma gain tracking enabling notably display of top users based on
weekly / monthly gain in website profile.
SPECIFCIATIONS
Each time a user gains karma a record is created in the gamification karma
tracking model. Scheduled activity runs to consolidate the records into
monthly gain records to avoid having crowdy table and unnecessary noise
in karma gain.
This model is made private and only accessible through some dedicated
compute methods / controllers used in website profile.
In website profile module buttons are added to see users ranking based
on their total karma (like before) but also by last week and last month
gains (using the newly introduced tracking model).
LINKS
Task ID 2003505
PR #34594
Before this task, when the user arrived on his profile,
some empty sections didn't had any call to actions
task-2080615
closesodoo/odoo#38029
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
SPECIFICATIONS
* Remove the /home from the breadcrumb in user profile
* Rename the Home (on a specific course) into "Courses"
Task 2062640
closesodoo/odoo#36900
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...
64px is close enough to 128px that it can be removed without a big impact on
download size.
It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.
The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.
If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.
Views
=====
- remove width and height attributes when existing CSS rules are overriding them
(eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules
task-2060865
closesodoo/odoo#36147
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
When having not square images for user avatar several issues appear
* website_slides: heroes of the week banner is broken as circles are not
circles anymore. They look more like UFOs or funny snowmen;
* website_slides: my user status / leaderboard / achievements card display
is broken as image may take much more width than planned;
* website_slides: channel page view displays user avatar when having joined
it, and it is broken;
* website_profile: user avatars in top 3 of users karma ranking is broken.
In this commit we apply strict rules on width / height combined to an object
fit in order to always have a bioutifoul displayed circled image.
Task 2065425 (avatar ratio badly displayed)
PR #36756
* website_forum, website_profile
- Share some code between website_forum and website_profile by exposing
a function in web_editor to instantiate a wysiwyg instance on a
textarea
- Use no-lazy loaded JS to add a visual loading effect while the
wysiwyg is not yet available.
This is made in preparation of task-2024197
(see https://github.com/odoo/odoo/pull/35749)
Thanks to @stefanorigano
closesodoo/odoo#36581
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before, we were adding a card slot for each badge but displaying information on this
slot only if the badge was website_published. This led to empty slots.
Now, we add only the section if the badge is website_published.
Also, the badge count should only display the number of website_published
received badge of the user. As the profile page is only displayed the information
about 'frontend' achievements (elearning and forum) of the user.
Task ID:2045192
PR #35321
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
* = web, website_blog, website_crm_partner_assign, website_event,
website_event_track, website_forum, website_hr_recruitment,
website_livechat, website_partner, website_profile, website_sale,
website_sale_delivery, website_slides
The published button name is a bit ambiguous, now it will clearly state
what it does with a new title : "Go to Website". The "Published",
"Unpublished" state is shown with the globe icon changing color
(green and red) and a title on the button.
Badge and Delivery don't have a website page, the button will then be
a publish/unpublish button in the backend.
task-2002435
closesodoo/odoo#34261
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
* = website_forum, website_profile, website_sale,
website_sale_comparison, website_slides, website_slides_survey
Some image links were hard coded in the xml views of website, now they
are replaced with website.image_url(model, field).
Part of https://github.com/odoo/odoo/pull/34149
task-2007400
closesodoo/odoo#34149
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The following models are already using big images, or they might need big images
in the future:
- partner
- hr employee
- shop category
- lunch product
- gamification badge and karma rank
PR: #34925
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
what was previously the big size)
+ add new intermediate format:
image_512
PR: #34925
This fix correctly displayed motivational of next rank to achieve depending
on current karma. Indeed description_motivational field is not the
motivational to reach next rank but to reach the current rank, taken from
previous rank point of view. That way a given rank is configured by modifying
only 1 data.
When not having any karma points (newly created user) the next rank is computed
as being the first available rank. Motivational phrases and badges are updated
accordingly. This commit partially reverts 489c8623e2.
Result
* new user with no karma: next rank is the first rank;
* user with karma and next rank: as currently;
* user being at final rank: next rank is just current rank with a 100%
circle;
Linked to task 2005840
Related to PR #34220
As user is a loop variable we can directly use its index instead of a rank
position that is not always correctly computed when not being logged due
to access rights issues.
Linked to task 2005840
Related to PR #34220
After this commit https://github.com/odoo/odoo/commit/ff870099c588e56 some of the events are left
in website_forum, that caused some buttons to be inactive. In order to fix that
events moved to website_profile.
Note: code is moved as it is. Cleaning class / namespace will be done in master
to avoid issues due to stable version.
Related to task 2006045
closesodoo/odoo#34138
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, while editing user profile from frontend, biography is displayed in
textarea despite of being an HTML field.
This commit fixes the behavior by providing users with wysiwyg ediotr to
update their biography while editing profile from frondend.
task-2007731
closesodoo/odoo#34207
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The error message now display a message containing the term of
the search and it is also not always displayed as it was before
Task ID : 2036652
closesodoo/odoo#35052
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, if you was searching something that return no results,
you will call the sql query generating an error syntax:
Traceback:
ERROR: syntax error at or near ")"
LINE 8: WHERE sub.id IN ()
Now, we don't make more useless query if we know that there are no users.
+ preventive fix the call of this method without user_ids
This commit is related to #14667closesodoo/odoo#33715
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Move code from website_forum allowing to edit its own profile. Otherwise
fields to update are not white listed. Also add an unpublished flag when
seeing unpublished users in order to know it if you have access to
depending on ACLs.
Linked to task 1978530
Related to PR #33559
Steps to reproduce the bug:
- Create a new profile P with "free signup"
- Log with P
- Go to website profile of P
- Send an email to valide the email of P
- Click on the generated link in the verfification email
- P is able to edit his profile
- Open a new session with P
Bug:
P was not able to edit his profile because the variable "validation_email_done" is
reset to False. Now the karma on the user is checked (inspired from website_profile
in template "email_validation_banner")
opw:1984576
closesodoo/odoo#33335
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Before this commit, only the users who validated their email could change
their own profile. In addition to that behavior we let administrators update
all profiles.
Commit linked to task ID 1978530 (fixes linked to internal testing).
Purpose: reduce some customization and ease eLearning link with themes. For
that purpose use the body class name propagation recently added.
Also mask the initial part of the circular progress, removing the border
radius effect.
Linked to task 1958372
Related to PR #32648
This commit changes:
- In elearning homepage, change "Heroes of the week"
to "leaderboard of the week"
- In user profile, change "Rank: Master" to
"Current Rank: Master"
- In the "Edit Profile" view, remove the required
on the description text area
Task: #1961116
PR: #32621
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Set badge image if any instead of forcing badge level icon in badge page.
If badge has no image, use the badge level icon. And if no badge level, show default placeholder icon.
Task ID: 1961700
PR #32255
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>