diff --git a/yuthon_holiday/__manifest__.py b/yuthon_holiday/__manifest__.py index 930815d26..fe2800e7e 100644 --- a/yuthon_holiday/__manifest__.py +++ b/yuthon_holiday/__manifest__.py @@ -7,6 +7,7 @@ 'license': 'LGPL-3', 'data': [ 'security/ir.model.access.csv', + 'security/yuthon_holiday_group.xml', 'data/yuthon_holiday_data.xml', 'views/inherit_hr_type_views.xml', 'views/inherit_hr_leave_allocation_views.xml', diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 87c4c723b..ab8de5f52 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -141,6 +141,13 @@ class HolidaysRequestBatch(models.Model): is_issues = fields.Boolean(string='是否上会') leave_by_hour = fields.Boolean(string='请假单位(小时)', default=False) leave_by_day = fields.Boolean(string='请假单位(天)', default=True) + urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', + default='normal') + + def _get_default_name_title(self): + return self._description if self._description else self._name + + name_title = fields.Char(default=_get_default_name_title) @api.depends("users_id") def _compute_details(self): diff --git a/yuthon_holiday/models/inherit_hr_leave_type.py b/yuthon_holiday/models/inherit_hr_leave_type.py index 1e6a909f1..1297f7fb2 100644 --- a/yuthon_holiday/models/inherit_hr_leave_type.py +++ b/yuthon_holiday/models/inherit_hr_leave_type.py @@ -7,7 +7,7 @@ class HrLeaveType(models.Model): leave_documents_id = fields.Many2many('ir.attachment', string="假期详细说明") duration_calculation = fields.Float(string="时长计算") - request_unit = fields.Selection([('calendar', '自然日'), ('working','工作日'), ('hour', '小时'), ('half_day', '半天')], string="请假单位", default='hour') + request_unit = fields.Selection([('day', '天'), ('hour', '小时'), ('half_day', '半天')], string="请假单位", default='hour') employee_requests = fields.Selection([('yes', '允许的额外天数要求'), ('no', '不允许')], string='员工要求', default='yes') allocation_validation_type = fields.Selection(defalt='no') start_date = fields.Date(string="生效日期", default=fields.Date.today()) diff --git a/yuthon_holiday/models/yuthon_fixes_approval.py b/yuthon_holiday/models/yuthon_fixes_approval.py index 59c2a0ba4..63263ce03 100644 --- a/yuthon_holiday/models/yuthon_fixes_approval.py +++ b/yuthon_holiday/models/yuthon_fixes_approval.py @@ -25,6 +25,13 @@ class YuthonFixesApproval(models.Model): leave_id = fields.Many2one('hr.leave.allocation') active = fields.Boolean('Active', default=True, tracking=True) remarks = fields.Text(string="备注") + urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', + default='normal') + + def _get_default_name_title(self): + return self._description if self._description else self._name + + name_title = fields.Char(default=_get_default_name_title) def bottom_allocation(self): for record in self: diff --git a/yuthon_holiday/security/yuthon_holiday_group.xml b/yuthon_holiday/security/yuthon_holiday_group.xml new file mode 100644 index 000000000..76f799240 --- /dev/null +++ b/yuthon_holiday/security/yuthon_holiday_group.xml @@ -0,0 +1,17 @@ + + + + + 假期组 + + + 假期:用户 + + + + 假期:管理员 + + + + + \ No newline at end of file diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml index 9a29678ee..6e0f62d87 100644 --- a/yuthon_holiday/views/hr_leave_batch.xml +++ b/yuthon_holiday/views/hr_leave_batch.xml @@ -19,9 +19,26 @@
- - + + + + + + + + + + + +
+

+ +

+