19 lines
956 B
Python
19 lines
956 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import models, fields, api, exceptions, _
|
|
|
|
|
|
class HrAttendance(models.Model):
|
|
_inherit = "hr.attendance"
|
|
_description = "Attendance"
|
|
|
|
is_clock_card = fields.Boolean(string="外勤打卡")
|
|
is_no_card = fields.Boolean(string="是否缺卡")
|
|
is_early_card = fields.Boolean(string="是否早退")
|
|
is_late_card = fields.Boolean(string="是否迟到")
|
|
work_time_type = fields.Selection([('close_day', '休息日'), ('work_day', '工作日')], string="工作时间类型")
|
|
on_card_location = fields.Char(string="上班打卡地点")
|
|
down_card_location = fields.Char(string="下班打卡地点")
|
|
out_card_time = fields.Datetime(string="外出打卡时间")
|
|
out_card_location = fields.Char(string="外出打卡地点")
|
|
work_hours = fields.Float(string="工作时长")
|
|
company_id = fields.Many2one('res.company', string='公司', index=True, default=lambda self: self.env.company) |