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 @@ +