[FIX] hr_attendance: get group via xmlid instead of searching via name match (which will not works in other languages)

This commit is contained in:
Christophe Simonis
2016-10-03 16:31:01 +02:00
parent 9fc91bd354
commit 366b01f079
+1 -1
View File
@@ -38,7 +38,7 @@ class HrEmployee(models.Model):
@api.multi
def _inverse_manual_attendance(self):
manual_attendance_group = self.env['res.groups'].search([('name', '=', 'Manual Attendance')])
manual_attendance_group = self.env.ref('hr.group_hr_attendance')
for employee in self:
if employee.user_id:
if employee.manual_attendance: