-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] website_profile: new module holding website-related code for ga…
…mification 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 odoo#30514). Main specifications related to eLearning can be found on task 1902304 (PR odoo#29876). Co-Authored-By: David Beguin <dbe@odoo.com> Co-Authored-By: Thibault Delavallee <tde@odoo.com>
- Loading branch information
1 parent
d400590
commit 10b8bad
Showing
7 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
{ | ||
'name': 'Website profile', | ||
'category': 'Hidden', | ||
'version': '1.0', | ||
'summary': 'Access the website profile of the users', | ||
'description': """Allows to acces the website profile of the users and see their statistics (karma, badges, etc..)""", | ||
'depends': [ | ||
'website', | ||
'gamification' | ||
], | ||
'data': [ | ||
'views/gamification_badge_views.xml', | ||
'security/ir.model.access.csv', | ||
], | ||
'auto_install': False, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import gamification_badge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from odoo import models | ||
|
||
|
||
class GamificationBadge(models.Model): | ||
_name = 'gamification.badge' | ||
_inherit = ['gamification.badge', 'website.published.mixin'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink | ||
gamification_karma_rank_access_website_publisher,gamification.karma.rank.access.website.publisher,gamification.model_gamification_karma_rank,website.group_website_publisher,1,1,1,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
<record id="gamification_badge_view_form" model="ir.ui.view"> | ||
<field name="name">gamification.badge.view.form.inherit.website</field> | ||
<field name="model">gamification.badge</field> | ||
<field name="inherit_id" ref="gamification.badge_form_view"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//div[@name='button_box']" position="inside"> | ||
<button class="oe_stat_button" name="website_publish_button" | ||
type="object" icon="fa-globe"> | ||
<field name="is_published" widget="website_button"/> | ||
</button> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |