加班明细日志

This commit is contained in:
pengyuthon
2026-03-05 23:14:00 +08:00
parent 17a13f0b9d
commit c6dbe8355e
8 changed files with 18 additions and 3 deletions
@@ -603,6 +603,7 @@ class HolidaysRequestBatch(models.Model):
self.env['vacation.over.line'].create({
'vacation_id': actual_vacation_report.id,
'employee_id': employee_id,
'logging_data': '666',
'workflow_record_id': leave_data.get('workflow_id', False),
'update_type': 'reduce',
'workday': interval_hours,
@@ -649,6 +650,7 @@ class HolidaysRequestBatch(models.Model):
'carry_forward_date': fields.Date.to_string(period_start),
'carry_forward_quantity': record.carry_forward_quantity + deduct_amount,
'carry_forward_state': carry_state,
'logging_data': '113',
})
remaining_deduct -= deduct_amount
@@ -360,6 +360,7 @@ class OvertimeApprovals(models.Model):
over.write({
'workday': workday,
'legal_day': legal_day,
'logging_data': '115',
'public_holidays': public_holidays,
'update_date': fields.Datetime.now(),
})
@@ -43,7 +43,8 @@ class VacationOvertimeActive(models.Model):
])
overtime_lines.write({
'workday': record.carry_forward_quantity,
'update_date': record.carry_forward_date
'update_date': record.carry_forward_date,
'logging_data': 'qq',
})
@@ -154,6 +154,7 @@ class YuthonOvertimeLine(models.Model):
rec.write({
'carry_forward_quantity': rec.carry_forward_quantity + allocate_amount,
'carry_forward_state': new_state,
'logging_data': 'w',
'carry_forward_date': overtime_id.carry_forward_date
})
report_id = self.env['yuthon.vacation.reports'].search([
@@ -166,6 +167,7 @@ class YuthonOvertimeLine(models.Model):
'employee_id': rec.employee_id.id,
'department_id': rec.department_id.id,
'update_type': 'reduce',
'logging_data': '555',
'workday': allocate_amount,
'update_date': fields.Date.today(),
'is_void': False,
@@ -567,7 +567,8 @@ class YuthonVacationReports(models.Model):
])
if overtime_records:
overtime_records.write({
'is_initial_number': True
'is_initial_number': True,
'logging_data': 'r',
})
def write(self, vals):
@@ -889,6 +890,7 @@ class YuthonVacationReports(models.Model):
'workday': rec.year_workday * 8,
'public_holidays': rec.year_holiday * 8,
'legal_day': 0.0,
'logging_data': '444',
'text': "上月额度继承"
}
self.env['vacation.over.line'].create(over_line_create_vals)
@@ -1544,7 +1546,8 @@ class YuthonVacationReports(models.Model):
'legal_day': 0,
'public_holidays': 0,
'meal_number': 0,
'text': f"上月额度继承"
'text': f"上月额度继承",
'logging_data': '333',
})
def _update_parental_leave_lines(self, report, allocations, number_of_hours_display, update_date, end_date):
@@ -1942,6 +1945,7 @@ class VacationOverline(models.Model):
default='pending',
)
remaining_quantity = fields.Float(string='剩余数', compute="_compute_last_balance")
logging_data = fields.Char(string="日志日志日志")
def open_record1(self):
tree_id = self.env.ref("yuthon_hr_attendance.view_yuthon_vacation_overtime_tree").id
@@ -268,6 +268,7 @@
<field name="overtime_methods"/>
<field name="is_void"/>
<field name="text"/>
<field name="logging_data"/>
<button name="unlink" string="删除" type="object" class="btn-primary"
groups="yuthon_holiday.group_yuthon_holiday_admin"/>
<button name="unlink" string="撤销" invisible="is_confirm == True" type="object"
@@ -514,6 +515,7 @@
<field name="overtime_methods"/>
<field name="is_void"/>
<field name="text"/>
<field name="logging_data"/>
<button name="unlink" string="删除" invisible="workflow_record_id" type="object"
class="btn-primary" groups="yuthon_holiday.group_yuthon_holiday_admin"/>
</tree>
@@ -33,6 +33,7 @@ class PayCarryoverWizard(models.TransientModel):
'update_date': fields.Date.today(),
'is_void': False,
'overtime_methods': 'fee',
'logging_data': '222',
'text': f'{rec.vacation_date.month}月份加班结算',
}])
if is_2025_december and overtime.is_initial_number:
@@ -62,6 +63,7 @@ class PayCarryoverWizard(models.TransientModel):
record.write({
'carry_forward_date': fields.Date.to_string(fields.Date.today()),
'carry_forward_quantity': deduct_amount,
'logging_data': '112',
'carry_forward_state': carry_state,
})
remaining_deduct -= deduct_amount
@@ -82,6 +82,7 @@ class YuthonVacationImportWizard(models.TransientModel):
'workday': workday_value,
'public_holidays': public_holidays,
'vacation_id': vacation_id.id,
'logging_data': '111'
})
for overtime in target_overtimes: