diff --git a/addons/gamification/badge.py b/addons/gamification/badge.py index 35d6c0b4756..00eb11fb38e 100644 --- a/addons/gamification/badge.py +++ b/addons/gamification/badge.py @@ -176,8 +176,6 @@ class gamification_badge(osv.Model): string='Goals Linked', help="The users that have succeeded theses goals will receive automatically the badge."), - 'public': fields.boolean('Public', - help="A message will be posted on the user profile or just sent to him"), 'owner_ids': fields.one2many('gamification.badge.user', 'badge_id', string='Owners', help='The list of instances of this badge granted to users'), 'unique_owner_ids': fields.function(_get_unique_global_list, @@ -206,8 +204,7 @@ class gamification_badge(osv.Model): 'stat_this_month': 0, 'rule_auth': 'everyone', 'rule_automatic': 'manual', - 'compute_code': "self.nobody(cr, uid, context)", - 'public': True + 'compute_code': "self.nobody(cr, uid, context)" } def send_badge(self, cr, uid, badge_id, badge_user_ids, user_from=None, context=None): diff --git a/addons/gamification/badge_view.xml b/addons/gamification/badge_view.xml index 41d5a82fa4b..651905253d6 100644 --- a/addons/gamification/badge_view.xml +++ b/addons/gamification/badge_view.xml @@ -86,7 +86,6 @@ - diff --git a/addons/hr_gamification/badge.py b/addons/hr_gamification/badge.py index a46c8fd51f7..0c0ee260c47 100644 --- a/addons/hr_gamification/badge.py +++ b/addons/hr_gamification/badge.py @@ -55,7 +55,7 @@ class hr_gamification_badge(osv.Model): if 'badge_user' in context and 'badge_id' in context: badge = self.browse(cr, uid, context['badge_id'], context=context) badge_user = context['badge_user'] - if badge.public and badge_user.employee_id: + if badge_user.employee_id: return self.pool.get('hr.employee').message_post(cr, uid, badge_user.employee_id.id, context=context, **kwargs) return super(hr_gamification_badge, self).message_post(cr, uid, thread_id, context=context, **kwargs)