From 138c1de8a45c8d55d91c68bb9a2eb36ae282636c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 15:59:44 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yuthon_holiday/models/inherit_hr_leave.py | 34 -------------------
yuthon_holiday/views/hr_leave_batch.xml | 1 -
.../views/yuthon_will_task_views.xml | 2 +-
3 files changed, 1 insertion(+), 36 deletions(-)
diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py
index b1d54cfda..429e9b969 100644
--- a/yuthon_holiday/models/inherit_hr_leave.py
+++ b/yuthon_holiday/models/inherit_hr_leave.py
@@ -118,32 +118,6 @@ class HrLeave(models.Model):
hour_batch_id = fields.Many2one(string='批量', comodel_name='hr.leave.batch', ondelete='cascade')
leave_documents_ids = fields.Many2many(related='holiday_status_id.leave_documents_id', string="假期详情说明", readonly=True)
details = fields.Text(string="假期流程说明")
- request_hour_from_real = fields.Selection([
- ('0', '0:00'), ('0.5', '0:30'),
- ('1', '01:00'), ('1.5', '01:30'),
- ('2', '02:00'), ('2.5', '02:30'),
- ('3', '03:00'), ('3.5', '03:30'),
- ('4', '04:00'), ('4.5', '04:30'),
- ('5', '05:00'), ('5.5', '05:30'),
- ('6', '06:00'), ('6.5', '06:30'),
- ('7', '07:00'), ('7.5', '07:30'),
- ('8', '08:00'), ('8.5', '08:30'),
- ('9', '09:00'), ('9.5', '09:30'),
- ('10', '10:00'), ('10.5', '10:30'),
- ('11', '11:00'), ('11.5', '11:30'),
- ('12', '12:00'), ('12.5', '12:30'),
- ('13', '13:00'), ('13.5', '13:30'),
- ('14', '14:00'), ('14.5', '14:30'),
- ('15', '15:00'), ('15.5', '15:30'),
- ('16', '16:00'), ('16.5', '16:30'),
- ('17', '17:00'), ('17.5', '17:30'),
- ('18', '18:00'), ('18.5', '18:30'),
- ('19', '19:00'), ('19.5', '19:30'),
- ('20', '20:00'), ('20.5', '20:30'),
- ('21', '21:00'), ('21.5', '21:30'),
- ('22', '22:00'), ('22.5', '22:30'),
- ('23', '23:00'), ('23.5', '23:30')],
- string='实际开始时间', compute='_compute_request_hour_from_real')
# custom_document_ids = fields.Many2many(
# string='文件',
# comodel_name='ir.attachment',
@@ -209,14 +183,6 @@ class HrLeave(models.Model):
for leave in leave_ids:
leave.state = 'draft'
- @api.depends('request_hour_from')
- def _compute_request_hour_from_real(self):
- for record in self:
- if record.request_hour_from == '9':
- record.request_hour_from_real = '8'
- else:
- record.request_hour_from_real = record.request_hour_from
-
@api.depends('date_from', 'date_to', 'resource_calendar_id', 'holiday_status_id.request_unit')
def _compute_duration(self):
super()._compute_duration()
diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml
index 64ebe943e..e9d0609e3 100644
--- a/yuthon_holiday/views/hr_leave_batch.xml
+++ b/yuthon_holiday/views/hr_leave_batch.xml
@@ -230,7 +230,6 @@
-
diff --git a/yuthon_will_task/views/yuthon_will_task_views.xml b/yuthon_will_task/views/yuthon_will_task_views.xml
index 102ef78d0..c8940b950 100644
--- a/yuthon_will_task/views/yuthon_will_task_views.xml
+++ b/yuthon_will_task/views/yuthon_will_task_views.xml
@@ -255,7 +255,7 @@
领导日程
yuthon.will.task
tree,calendar,form
- [('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '副总经理'])]
+ [('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '副总经理', '司机'])]
{'search_default_next_seven_days': 1}