From 02e4140b2790460607e8a536a5bf0cf33d59536e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 26 Mar 2026 15:44:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_holiday/models/extended_vacation_approval.py | 3 ++- yuthon_holiday/views/extended_vacation_approval_views.xml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/yuthon_holiday/models/extended_vacation_approval.py b/yuthon_holiday/models/extended_vacation_approval.py index d0b0b9d05..f68becba9 100644 --- a/yuthon_holiday/models/extended_vacation_approval.py +++ b/yuthon_holiday/models/extended_vacation_approval.py @@ -13,7 +13,8 @@ class ExtendedVacationApproval(models.Model): code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_extended_code')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") - company_id = fields.Many2one('res.company', '公司', default=lambda self: self.env.user.company_id) + company_id = fields.Many2one(related="users_id.employee_id.company_id", string="公司") + is_this_company = fields.Boolean(string='本公司', default=True) # 是否仅显示本公司员工,勾选后 employee_ids 候选项按 company_id 过滤 employee_ids = fields.Many2many('hr.employee', string="假期顺延人员") type_vacations_ids = fields.Many2many('extended.type', string="假期类型") is_issues = fields.Boolean(string='是否上会') diff --git a/yuthon_holiday/views/extended_vacation_approval_views.xml b/yuthon_holiday/views/extended_vacation_approval_views.xml index 29bb8a6cb..297c2aba0 100644 --- a/yuthon_holiday/views/extended_vacation_approval_views.xml +++ b/yuthon_holiday/views/extended_vacation_approval_views.xml @@ -48,7 +48,9 @@ - + +