# -*- coding: utf-8 -*- ############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2024-TODAY Cybrosys Technologies() # Author: Vishnu KP() # # You can modify it under the terms of the GNU LESSER # GENERAL PUBLIC LICENSE (LGPL v3), Version 3. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. # # You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # (LGPL v3) along with this program. # If not, see . # ############################################################################# from odoo.http import request from odoo.addons.hr_attendance.controllers.main import HrAttendance from odoo import _, http class HrAttendances(HrAttendance): """Controllers Overrides to add the Face detection feature""" @http.route('/get_image', type="json", auth="public") def get_image(self,employee_id): image = request.env['hr.employee'].sudo().browse(employee_id).image_1920 return image