From 224eb5beab882936c3408b0280f989a89861e74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Mon, 22 Dec 2025 15:44:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_holiday/models/inherit_hr_leave.py | 2 +- yuthon_salary/models/inherit_hr_payroll_structure.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 3686339dc..1636a479a 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -734,7 +734,7 @@ class HolidaysRequestBatch(models.Model): if reports_id: leave_days = reports_id.leave overtime_days = reports_id.working_overtime - record.holiday_allowance = f"年假{leave_days:.1f}天, 补休{overtime_days:.1f}天" + record.holiday_allowance = f"年假{leave_days:.3f}天, 补休{overtime_days:.3f}天" class HrLeaveLine(models.Model): _name = 'hr.leave.line' diff --git a/yuthon_salary/models/inherit_hr_payroll_structure.py b/yuthon_salary/models/inherit_hr_payroll_structure.py index d066551cc..d30465e5e 100644 --- a/yuthon_salary/models/inherit_hr_payroll_structure.py +++ b/yuthon_salary/models/inherit_hr_payroll_structure.py @@ -286,6 +286,14 @@ class HrPayrollStructure(models.Model): if other_logs: other_logs.sudo().write({'is_enable': False}) + + def action_yuthon_salary(self): + payroll_ids = self.env["hr.payroll.structure"].browse( + self._context.get('active_ids', self._context.get('active_id'))) + for structure in payroll_ids: + if structure.type_id: + structure.type_id.default_struct_id = structure.id + def action_yuthon_salary_wizard(self): return { "type": "ir.actions.act_window",