添加功能

This commit is contained in:
李鹏宇
2025-12-22 15:44:22 +08:00
parent 3feff65025
commit 224eb5beab
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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'
@@ -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",