From 6f26f4d18643b54dbfa20f11c8f0e5e0a270a433 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Mon, 17 Mar 2025 14:54:35 +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 | 21 ++++++++++++++------- yuthon_holiday/views/hr_leave_batch.xml | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 8b7111c9b..6e2bd2c4a 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -53,13 +53,13 @@ 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="假期流程说明") - custom_document_ids = fields.Many2many( - string='文件', - comodel_name='ir.attachment', - relation='leave_custom_doc_rel', - column1='leave_id', - column2='attachment_id' - ) + # custom_document_ids = fields.Many2many( + # string='文件', + # comodel_name='ir.attachment', + # relation='leave_custom_doc_rel', + # column1='leave_id', + # column2='attachment_id' + # ) request_hour_from = fields.Selection([ ('0', '00:00'), ('0.5', '00:30'), ('1', '1:00'), ('1.5', '1:30'), @@ -219,6 +219,13 @@ class HolidaysRequestBatch(models.Model): leave_by_day = fields.Boolean(string='请假单位(天)', default=True) urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') + custom_document_ids = fields.Many2many( + string='文件', + comodel_name='ir.attachment', + relation='leave_custom_doc_rel', + column1='leave_id', + column2='attachment_id' + ) def _get_default_name_title(self): return self._description if self._description else self._name diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml index a2b4a042e..6c18debb9 100644 --- a/yuthon_holiday/views/hr_leave_batch.xml +++ b/yuthon_holiday/views/hr_leave_batch.xml @@ -7,7 +7,6 @@ - @@ -51,6 +50,7 @@ +