[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
This commit is contained in:
Yannick Tivisse
2016-09-20 14:35:29 +02:00
parent 745d1e3328
commit b1add6a96e
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -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')
@@ -5,6 +5,7 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="priority">10</field>
<field name="groups_id" eval="[(4,ref('hr_attendance.group_hr_attendance_user'))]"/>
<field name="arch" type="xml">
<field name="name" position="replace">
<div id="textbox">