添加功能

This commit is contained in:
zhou
2025-08-20 09:55:33 +08:00
parent afe3803756
commit 1816649631
2 changed files with 8 additions and 1 deletions
@@ -319,7 +319,6 @@ class HrAttendance(models.Model):
utc_start = local_start - timedelta(hours=8)
utc_end = local_end - timedelta(hours=8)
domain = [
("exception_type", "!=", "未打卡"),
('employee_id', '=', employee_id),
('checkin_time', '>=', fields.Datetime.to_string(utc_start)),
('checkin_time', '<', fields.Datetime.to_string(utc_end))
@@ -29,6 +29,11 @@
<field name="model">hr.attendance</field>
<field name="inherit_id" ref="hr_attendance.hr_attendance_view_form" />
<field name="arch" type="xml">
<xpath expr="//form" position="attributes">
<attribute name="create">false</attribute>
<attribute name="delete">false</attribute>
<attribute name="edit">false</attribute>
</xpath>
<xpath expr="//field[@name='check_in']" position="before">
<field name="current_data"/>
</xpath>
@@ -38,6 +43,9 @@
<xpath expr="//field[@name='employee_id']" position="attributes">
<attribute name="widget">None</attribute>
</xpath>
<xpath expr="//field[@name='in_mode']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='check_out']" position="after">
<field name="sch_check_out_time"/>
<field name="check_noon"/>