mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[IMP] hr_attendance_work_entry: Modified kiosk mode views and attendance views to allow for various punch types.
This commit is contained in:
committed by
Jared Kipe
parent
87ac2897f3
commit
d52761f5bc
@@ -1,4 +1,4 @@
|
||||
from odoo import fields, models
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class HrAttendance(models.Model):
|
||||
@@ -7,3 +7,8 @@ class HrAttendance(models.Model):
|
||||
work_type_id = fields.Many2one('hr.work.entry.type', string='Work Type',
|
||||
default=lambda self: self.env.ref('hr_attendance_work_entry.work_input_attendance',
|
||||
raise_if_not_found=False))
|
||||
|
||||
@api.model
|
||||
def gather_attendance_work_types(self):
|
||||
work_types = self.env['hr.work.entry.type'].sudo().search([('allow_attendance', '=', True)])
|
||||
return work_types.read(['id', 'name', 'attendance_icon'])
|
||||
|
||||
Reference in New Issue
Block a user