This commit is contained in:
李鹏宇
2025-09-12 11:58:39 +08:00
parent c76652f07d
commit 1967bf8ecd
2 changed files with 46 additions and 31 deletions
@@ -52,6 +52,7 @@ class YuthonVacationReports(models.Model):
exam_leave = fields.Integer(string='考试假', compute='_compute_other_leave', store=True, group_operator=None)
right_days = fields.Float(string='转正天数', group_operator=None)
internship_days = fields.Float(string='实习天数', group_operator=None)
test_days = fields.Float(string='试用天数', group_operator=None)
should_attendance = fields.Integer(string="应到", store=True, group_operator=None)
actual_attendance = fields.Integer(string="实到", compute='compute_attendance_fields', store=True,group_operator=None)
@@ -62,6 +63,7 @@ class YuthonVacationReports(models.Model):
is_work = fields.Integer(string='旷工', compute='compute_attendance_fields', store=True, group_operator=None)
is_abnormal = fields.Integer(string="异常", compute='compute_attendance_fields', store=True, group_operator=None)
vacation_state = fields.Selection(
selection=[
('unconfirmed', "未确认"),
@@ -66,6 +66,7 @@
<field name="actual_attendance" options='{ "fg_color": "white: actual_attendance == False"}'/>
<field name="right_days" options='{ "fg_color": "white: right_days == False"}'/>
<field name="internship_days" options='{ "fg_color": "white: internship_days == False"}'/>
<field name="test_days" options='{ "fg_color": "white: test_days == False"}'/>
<field name="done_leave" options='{ "fg_color": "white: done_leave == False"}'/>
<field name="done_working_overtime" options='{ "fg_color": "white: done_working_overtime == False"}'/>
<field name="meal_fee" options='{ "fg_color": "white: meal_fee == False"}'/>
@@ -123,6 +124,18 @@
<field name="medical_fee" string="剩余体检费"/>
</group>
</group>
<group col="4">
<group>
<field name="right_days"/>
</group>
<group>
<field name="internship_days"/>
</group>
<group>
<field name="test_days"/>
</group>
<group/>
</group>
<notebook>
<page string="年假">
<field name="leave_ids" context="{'default_employee_id': employee_id}">
@@ -181,6 +194,22 @@
</tree>
</field>
</page>
<page string="其他请假">
<field name="other_fee_ids" context="{'default_employee_id': employee_id}">
<tree editable="bottom" delete="false" decoration-muted="is_void">
<field name="employee_id" column_invisible="1"/>
<field name="vacation_id" column_invisible="1"/>
<field name="workflow_record_id" domain="[('workflow_id.name', '=', '请假'), ('create_uid.employee_id', '=', employee_id)]"/>
<field name="holiday_type"/>
<field name="update_type" readonly="1"/>
<field name="update_date" readonly="1"/>
<field name="lines"/>
<field name="is_void"/>
<field name="text"/>
<button name="unlink" string="删除" invisible="workflow_record_id" type="object" class="btn-primary" groups="yuthon_holiday.group_yuthon_holiday_admin"/>
</tree>
</field>
</page>
<page string="体检费">
<field name="medical_fee_ids" context="{'default_employee_id': employee_id}">
<tree editable="bottom" delete="false" decoration-muted="is_void">
@@ -198,22 +227,6 @@
</tree>
</field>
</page>
<page string="请假情况">
<field name="other_fee_ids" context="{'default_employee_id': employee_id}">
<tree editable="bottom" delete="false" decoration-muted="is_void">
<field name="employee_id" column_invisible="1"/>
<field name="vacation_id" column_invisible="1"/>
<field name="workflow_record_id" domain="[('workflow_id.name', '=', '请假'), ('create_uid.employee_id', '=', employee_id)]"/>
<field name="holiday_type"/>
<field name="update_type" readonly="1"/>
<field name="update_date" readonly="1"/>
<field name="lines"/>
<field name="is_void"/>
<field name="text"/>
<button name="unlink" string="删除" invisible="workflow_record_id" type="object" class="btn-primary" groups="yuthon_holiday.group_yuthon_holiday_admin"/>
</tree>
</field>
</page>
<page string="汇总" invisible="1">
<group>
<field name="is_late_card"/>
@@ -335,6 +348,21 @@
</tree>
</field>
</page>
<page string="其他请假">
<field name="other_fee_ids" context="{'default_employee_id': employee_id}">
<tree editable="bottom" delete="false" decoration-muted="is_void" edit="false" create="false">
<field name="employee_id" column_invisible="1"/>
<field name="vacation_id" column_invisible="1"/>
<field name="workflow_record_id" domain="[('workflow_id.name', '=', '请假'), ('create_uid.employee_id', '=', employee_id)]"/>
<field name="holiday_type"/>
<field name="update_type" readonly="1"/>
<field name="update_date" readonly="1"/>
<field name="lines"/>
<field name="is_void"/>
<field name="text"/>
</tree>
</field>
</page>
<page string="体检费">
<field name="medical_fee_ids" context="{'default_employee_id': employee_id}">
<tree editable="bottom" delete="false" decoration-muted="is_void" edit="false" create="false">
@@ -351,21 +379,6 @@
</tree>
</field>
</page>
<page string="其他">
<field name="other_fee_ids" context="{'default_employee_id': employee_id}">
<tree editable="bottom" delete="false" decoration-muted="is_void" edit="false" create="false">
<field name="employee_id" column_invisible="1"/>
<field name="vacation_id" column_invisible="1"/>
<field name="workflow_record_id" domain="[('workflow_id.name', '=', '请假'), ('create_uid.employee_id', '=', employee_id)]"/>
<field name="holiday_type"/>
<field name="update_type" readonly="1"/>
<field name="update_date" readonly="1"/>
<field name="lines"/>
<field name="is_void"/>
<field name="text"/>
</tree>
</field>
</page>
<page string="汇总" invisible="1">
<group>
<field name="is_late_card"/>