Commit Graph
7 Commits
Author SHA1 Message Date
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
Raphael Collet 35a9f6c27a [FIX] core: SELF_READABLE_FIELDS and SELF_WRITEABLE_FIELDS on res.users
Avoid setting up those lists with method __init__() on the model, since
the model's class no longer has the expected parent classes.
2021-05-06 07:30:24 +00:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-17 14:13:12 +02:00
Quentin Mourier 369143c986 [FIX] website_profile: allow to edit its profile
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
2019-05-22 09:16:30 +00:00
David Beguin fb40c6bf60 [IMP] website(_profile,_forum,_slides): move validation email to profile and use in forum and elearning
Email validation was necessary on the forum to be able to begin to use the forum
(ask or answer questions, vote, etc..)

As the new elearning also uses karma since 705376a982,
the email validation is now also necessary in the eLearning platform.

This is why this commit is moving the email validation process to website_profile
and extend website_slides (eLearning) and website_forum to use this feature.

In function of where the user asked to send him the validation email,
the user is redirected on the forum or on the elearning when he clicks on
'Validate my account' in the received 'email validation' email.

Task ID : 1943788
PR #31321
2019-03-15 14:58:28 +00:00
David Beguin ff870099c5 [ADD] website_profile : add profile page template for website modules
Move Profile part from website_forum into this module in order to be usable in other modules
(like website_slides) that will depend of this module.

Applies gamification.ranks on website_profile page. Show the current rank and the next rank
but also the progression until the next rank. Adds also an 'about rank' page to allow users to know
more about available ranks.

The goal here is to make the profile page more modular and to allow other modules to add informations
or modify easily link or part of profile page in order to be specifically contextualised
for the module in question.

Task ID : 1922159
PR #30988
2019-02-14 08:30:29 +00:00
Thibault DelavalléeandDavid Beguin b98564479b [ADD] website_profile: new module holding website-related code for gamification
Purpose is to be able to re-use frontend-related model, data and tools
for gamification. Currently only forum uses gamification. Soon slides module
will use them and user profile / biography will be expanded. This commit
prepares those features by already preparing the bridge module and adding
a publish option on badges.

Partial commit linked to eLearning project. Main specifications related
to gamification and user profile can be found on task 1922159 (PR #30514).
Main specifications related to eLearning can be found on task 1902304
(PR #29876).

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
2019-02-07 12:13:28 +00:00