Merge pull request !8771 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-02-07 11:15:21 +00:00
committed by Gitee
3 changed files with 9 additions and 0 deletions
@@ -12,6 +12,7 @@ class InheritHrLeave(models.Model):
caption = fields.Char(string="标题", compute="_compute_application_reason")
employee_id = fields.Many2one('hr.employee', string="发起人")
phone = fields.Char(related='employee_id.phone', string="手机号")
length_leave = fields.Float(string="请假时长", compute="_compute_application_reason")
leave_stats = fields.Char(string="请假统计", compute="_compute_leave_stats")
is_filing = fields.Boolean(string="归档")
@@ -1649,6 +1649,9 @@ class VacationOverline(models.Model):
is_initial_number = fields.Boolean(string="初始额度")
overtime_name = fields.Char(string="标题", compute="_compute_overtime", store=True)
reason_application = fields.Text(string="事由", compute="_compute_overtime", default=None, store=True)
meal = fields.Selection([('yes', '是'), ('no', '否')], string="误餐费", compute="_compute_overtime", default=None, store=True)
workflow_id = fields.Many2one(relate = 'workflow_record_id.workflow_id', string = '审批类型', store=True)
start_time = fields.Datetime(string="开始时间", compute="_compute_overtime", store=True)
end_time = fields.Datetime(string="结束时间", compute="_compute_overtime", store=True)
carry_forward_date = fields.Date(string="结转日期")
@@ -1786,6 +1789,8 @@ class VacationOverline(models.Model):
if res_model and res_id and res_model in self.env:
overtime_id = rec.env[res_model].search([('id', '=', res_id)], limit=1)
if overtime_id:
rec.meal = overtime_id.meal
rec.reason_application = overtime_id.reason_application
rec.overtime_name = overtime_id.name or ''
rec.start_time = overtime_id.start_time or ''
rec.end_time = overtime_id.end_time or ''
@@ -633,6 +633,9 @@
<field name="arch" type="xml">
<tree string="加班明细" editable="bottom">
<field name="overtime_name"/>
<field name="meal" invisible="1"/>
<field name="reason_application" invisible="1"/>
<!-- <field name="workflow_id"/>-->
<field name="employee_id"/>
<field name="department_id"/>
<field name="start_time"/>