Main cleaning - remove introduction_message, introduced in saas-6 with inboung forum, that was quite a duplicate of description. - renamed relevancy_option_first and relevancy_option_second, introduced in saas-4 with inbound forum - renamed type of post to post_type to avoid confusion with the type keyword - some cleaning in templates
31 lines
798 B
Python
31 lines
798 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from openerp import models, fields, api
|
|
|
|
|
|
class gamification_challenge(models.Model):
|
|
_inherit = 'gamification.challenge'
|
|
|
|
@api.model
|
|
def _get_categories(self):
|
|
res = super(gamification_challenge, self)._get_categories()
|
|
res.append(('forum', 'Website / Forum'))
|
|
return res
|
|
|
|
|
|
class Badge(models.Model):
|
|
_inherit = 'gamification.badge'
|
|
|
|
level = fields.Selection([('bronze', 'bronze'), ('silver', 'silver'), ('gold', 'gold')], string='Forum Badge Level')
|
|
|
|
|
|
class UserBadge(models.Model):
|
|
_inherit = 'gamification.badge.user'
|
|
|
|
level = fields.Selection(
|
|
[('bronze', 'bronze'),
|
|
('silver', 'silver'),
|
|
('gold', 'gold')],
|
|
string='Forum Badge Level',
|
|
related="badge_id.level", store=True)
|