From 98d85518c70aef6cb920db2bcb2972a7146691e9 Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Tue, 29 Jul 2025 16:44:46 +0800
Subject: [PATCH 1/2] =?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
---
.../models/yuthon_onboard_approval.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
index de2fa8d53..94bdd60ba 100644
--- a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
@@ -58,6 +58,8 @@ class YuthonOnboardApproval(models.Model):
contracted_status = fields.Selection([('first', '首'
'签'), ('renew', '续签')], string='合同类型')
is_office = fields.Boolean(string='是否领用办公物品', default=False)
+ structure_type_id = fields.Many2one('hr.payroll.structure.type', string='工资结构类型', readonly=True)
+ is_annual_salary = fields.Boolean(string="是否年薪")
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
default='normal')
active = fields.Boolean('Active', default=True, tracking=True)
@@ -124,6 +126,10 @@ class YuthonOnboardApproval(models.Model):
'name': self.employee_name,
'user_id': user.id, # 将用户与员工关联
})
+ use_user_type_name = dict(self._fields['use_user_type'].selection).get(self.use_user_type)
+ contract_type = self.env['hr.contract.type'].search([
+ ('name', '=', use_user_type_name)
+ ], limit=1)
form_id = self.env.ref('hr_contract.hr_contract_view_form').id
return {
'name': '合同',
@@ -135,6 +141,9 @@ class YuthonOnboardApproval(models.Model):
'default_job_id': self.job_id.id,
'default_employee_id': employee.id,
'default_date_start': self.duration_employment,
+ 'default_structure_type_id': self.structure_type_id.id,
+ 'default_is_annual_salary': self.is_annual_salary,
+ 'default_contract_type_id': contract_type.id,
'default_date_end': self.duration_employment_end,
}}
From e3e2ee429f1e4b3d84a5bfa3931e5f56c2144418 Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Tue, 29 Jul 2025 16:45:29 +0800
Subject: [PATCH 2/2] =?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
---
.../views/yuthon_onboard_approval_views.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
index 0151a9329..13d709cca 100644
--- a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
@@ -74,6 +74,8 @@
+
+