Merge branch 'dev' of https://gitee.com/jinan-pengyusen-data/gzth into dev_wang
This commit is contained in:
@@ -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'):
|
||||
# 提示用户确认删除
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user