'Receive a barcode scanned from the Kiosk Mode and change the attendances of corresponding employee.
Returns either an action or a warning.'

@api.model
def attendance_scan(self, barcode):

    employee = self.search([('barcode', '=', barcode)], limit=1)
    return ((employee and employee.attendance_action('hr_attendance.hr_attendance_action_kiosk_mode')) or {'warning': (_('No    employee    corresponding    to    barcode    %(barcode)s') % {'barcode': barcode})})
