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",