diff --git a/addons/hr_attendance/i18n/hr_attendance.pot b/addons/hr_attendance/i18n/hr_attendance.pot index d9f18073658..5d3462a377d 100644 --- a/addons/hr_attendance/i18n/hr_attendance.pot +++ b/addons/hr_attendance/i18n/hr_attendance.pot @@ -846,6 +846,14 @@ msgid "" "company screen." msgstr "" +#. module: hr_attendance +#: code:addons/hr_attendance/models/hr_employee.py:0 +#, python-format +msgid "" +"To activate Kiosk mode without pin code, you must have access right as an " +"Officer or above in the Attendance app. Please contact your administrator." +msgstr "" + #. module: hr_attendance #. openerp-web #: code:addons/hr_attendance/static/src/xml/attendance.xml:0 diff --git a/addons/hr_attendance/models/hr_employee.py b/addons/hr_attendance/models/hr_employee.py index 415a3747801..95c21dab47f 100644 --- a/addons/hr_attendance/models/hr_employee.py +++ b/addons/hr_attendance/models/hr_employee.py @@ -146,6 +146,8 @@ class HrEmployee(models.Model): can_check_without_pin = attendance_user_and_no_pin or (self.user_id == self.env.user and entered_pin is None) if can_check_without_pin or entered_pin is not None and entered_pin == self.sudo().pin: return self._attendance_action(next_action) + if not self.user_has_groups('hr_attendance.group_hr_attendance_user'): + return {'warning': _('To activate Kiosk mode without pin code, you must have access right as an Officer or above in the Attendance app. Please contact your administrator.')} return {'warning': _('Wrong PIN')} def _attendance_action(self, next_action):