diff options
| author | Keyur Gajjar <kga@odoo.com> | 2015-12-14 19:02:31 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2016-03-21 14:02:10 +0100 |
| commit | 82e35bce6c4fa2e6dca98309f7a9483a9a719eb9 (patch) | |
| tree | bb5773e41a238f252b5a0321a6e9b509350a3805 /addons/hr_gamification/models/gamification.py | |
| parent | bea7b198621a76f3f29853fc8725e9821ff375cc (diff) | |
[FIX] gamification: several layout issues
1/ ISSUES WITH BADGES:
Go to menu Employees > Badges > Select any Badge from kanban View.
Click on "GRANT THIS BADGE" button.
- When you grant a badge, the description field is not at the right place.
It should be below the employee field
- Badges Form View: "Granted Employees" should be a stat button with a counter
- Badges form view is broken, field label/values are not at right place
2/ ISSUES WITH CHALLENGES:
Go to menu Employees > Challenges
Challenges Kanban View
- Image Avatars are too big, make it smaller.
- Challenges Form View > Advanced Options : fields Report frequency, Report Template
and Send a Copy to are ugly
Diffstat (limited to 'addons/hr_gamification/models/gamification.py')
| -rw-r--r-- | addons/hr_gamification/models/gamification.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/hr_gamification/models/gamification.py b/addons/hr_gamification/models/gamification.py index 6a483837dfa..034f4e44d85 100644 --- a/addons/hr_gamification/models/gamification.py +++ b/addons/hr_gamification/models/gamification.py @@ -49,6 +49,16 @@ class gamification_badge(osv.Model): 'domain': [('id', 'in', employee_ids)] } + def _get_granted_employees_count(self, cr, uid, ids, field_name, arg, context=None): + res = {} + for badge in self.browse(cr, uid, ids, context=context): + res[badge.id] = self.pool.get('gamification.badge.user').search_count(cr, uid, [('badge_id', '=', badge.id), ('employee_id', '!=', False)], context=context) + return res + + _columns = { + 'granted_employees_count': fields.function(_get_granted_employees_count, type="integer") + } + class hr_employee(osv.osv): _name = "hr.employee" |
