From b1add6a96e8dfa721f18a8341205e42fc5bb807d Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Tue, 20 Sep 2016 14:29:21 +0200 Subject: [PATCH] [FIX] hr_attendance: Allow a not attendance user to create an employee Remove a groups_id in the view inherintence + remove the groups on the model --- addons/hr_attendance/models/hr_employee.py | 4 ++-- addons/hr_attendance/views/hr_employee_view.xml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/hr_attendance/models/hr_employee.py b/addons/hr_attendance/models/hr_employee.py index 026d9dd4df2..386daa9907b 100644 --- a/addons/hr_attendance/models/hr_employee.py +++ b/addons/hr_attendance/models/hr_employee.py @@ -20,8 +20,8 @@ class HrEmployee(models.Model): barcode = "".join(choice(digits) for i in range(8)) return barcode - barcode = fields.Char(string="Badge ID", help="ID used for employee identification.", default=_default_random_barcode, copy=False, groups='hr_attendance.group_hr_attendance_user') - pin = fields.Char(string="PIN", default=_default_random_pin, help="PIN used for Check In/Out in Attendance.", copy=False, groups='hr_attendance.group_hr_attendance_user') + barcode = fields.Char(string="Badge ID", help="ID used for employee identification.", default=_default_random_barcode, copy=False) + pin = fields.Char(string="PIN", default=_default_random_pin, help="PIN used for Check In/Out in Attendance.", copy=False) attendance_ids = fields.One2many('hr.attendance', 'employee_id', help='list of attendances for the employee') last_attendance_id = fields.Many2one('hr.attendance', compute='_compute_last_attendance_id') diff --git a/addons/hr_attendance/views/hr_employee_view.xml b/addons/hr_attendance/views/hr_employee_view.xml index 12e82a5fa7a..e70e347cd2f 100644 --- a/addons/hr_attendance/views/hr_employee_view.xml +++ b/addons/hr_attendance/views/hr_employee_view.xml @@ -5,6 +5,7 @@ hr.employee 10 +