!5816 添加功能

Merge pull request !5816 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-10-20 07:42:08 +00:00
committed by Gitee
2 changed files with 23 additions and 25 deletions
@@ -34,8 +34,8 @@ class OvertimeApprovals(models.Model):
attendance_id = fields.Many2one('hr.attendance', string="当天考勤")
start_week = fields.Char(string="星期", compute='_compute_weekday')
end_time = fields.Datetime(string="结束时间")
rest_start_time = fields.Datetime(string="开始时间")
rest_end_time = fields.Datetime(string="结束时间")
rest_start_time = fields.Datetime(string="休息开始时间")
rest_end_time = fields.Datetime(string="休息结束时间")
end_week = fields.Char(string="星期", compute='_compute_weekday')
type_overtime = fields.Selection([('work', '工作日加班'), ('weekend', '周末加班'), ('holiday', '节假日加班')],
string="加班类型", compute="_compute_overtime_type", store=True)
@@ -60,31 +60,29 @@
</group>
<group/>
</group>
<group col="2">
<group col="2" string="加班时间">
<group>
<label for="start_time"/>
<div class="d-inline-flex w-100">
<field name="start_time" string="开始日期" class="me-2"
style="max-width: 25rem !important;" required="1"/>
<field name="start_week" string=" " class="ms-2"
style="max-width: 5rem !important;"/>
</div>
<label for="end_time"/>
<div class="d-inline-flex w-100">
<field name="end_time" string="结束日期" class="me-2"
style="max-width: 25rem !important;" required="1"/>
<field name="end_week" string=" " class="ms-2"
style="max-width: 5rem !important;"/>
</div>
<field name="type_overtime"/>
</group>
</group>
<group string="休息时间">
<field name="rest_start_time"/>
<field name="rest_end_time"/>
<group col="2" string="加班信息">
<group>
<label for="start_time"/>
<div class="d-inline-flex w-100">
<field name="start_time" class="me-2"
style="max-width: 25rem !important;" required="1"/>
<field name="start_week" string=" " class="ms-2"
style="max-width: 5rem !important;"/>
</div>
<label for="end_time"/>
<div class="d-inline-flex w-100">
<field name="end_time" class="me-2"
style="max-width: 25rem !important;" required="1"/>
<field name="end_week" string=" " class="ms-2"
style="max-width: 5rem !important;"/>
</div>
</group>
</group>
<group>
<field name="rest_start_time"/>
<field name="rest_end_time"/>
<field name="type_overtime"/>
</group>
<group col="2">
<group>
<field name="duration"/>