This commit is contained in:
李鹏宇
2026-01-30 20:48:08 +08:00
2 changed files with 2 additions and 6 deletions
@@ -1407,7 +1407,6 @@ class SoongWorkflowLine(models.Model):
create_uid = fields.Many2one(related="workflow_record_id.create_uid", string="创建人")
write_date2 = fields.Datetime(related="workflow_record_id.write_date2", string="最后更新日期")
def unlink(self):
if not self.env.context.get('confirm_delete'):
# 提示用户确认删除
+2 -5
View File
@@ -605,13 +605,10 @@ class HolidaysRequestBatch(models.Model):
def _create_other_leave_line(self, period_start, leave_data, days, period, leave_type_name):
holiday_type = self.env['hr.leave.type'].search([('name', '=', leave_type_name)], limit=1)
report_month = date(period_start.year, period_start.month, 1)
month_end = date(period_start.year, period_start.month,
calendar.monthrange(period_start.year, period_start.month)[1])
first_day = fields.Date.today().replace(day=1)
vacation_report = self.env['yuthon.vacation.reports'].search([
('employee_id', '=', self.users_id.employee_ids.id),
('vacation_date', '>=', fields.Date.to_string(report_month)),
('vacation_date', '<=', fields.Date.to_string(month_end))
('vacation_date', '=', first_day),
], limit=1)
existing_leave_line = self.env['vacation.other.line'].search([
('employee_id', '=', self.users_id.employee_ids.id),