From b9f45fb636d5f31df1af46bbbc5e416258c56317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Tue, 3 Feb 2026 20:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=8A=A8=E4=BF=A1=E6=81=AF=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_contract/models/inherit_hr_contract.py | 14 +++++++++ yuthon_contract/security/ir.model.access.csv | 1 + .../views/inherit_hr_contract_views.xml | 30 ++++++++++++------- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/yuthon_contract/models/inherit_hr_contract.py b/yuthon_contract/models/inherit_hr_contract.py index 0d979c484..85663b93b 100644 --- a/yuthon_contract/models/inherit_hr_contract.py +++ b/yuthon_contract/models/inherit_hr_contract.py @@ -88,6 +88,7 @@ class HrContract(models.Model): compute="_compute_is_company", search="_search_part_of_company", ) + change_ids = fields.One2many('hr.contract.change.line', 'contract_id', string="异动信息") def update_version(self): contract_ids = self.env["hr.contract"].browse( @@ -418,3 +419,16 @@ class HrContract(models.Model): }) return contracts + + +class HrContractChangeLine(models.Model): + _name = 'hr.contract.change.line' + _description = '异动信息明细行' + + contract_id = fields.Many2one('hr.contract', string="关联合同") + department_id = fields.Many2one('hr.department', string="部门") + job_id = fields.Many2one('hr.job', string="工作岗位") + structure_type_id = fields.Many2one('hr.payroll.structure.type', string="工资结构类型") + salary_group_id = fields.Many2one('yuthon.salary.group', string="工资单分组") + change_start_date = fields.Date(string="开始日期") + change_end_date = fields.Date(string="结束日期") diff --git a/yuthon_contract/security/ir.model.access.csv b/yuthon_contract/security/ir.model.access.csv index a41277ec0..c49d6728e 100644 --- a/yuthon_contract/security/ir.model.access.csv +++ b/yuthon_contract/security/ir.model.access.csv @@ -1,5 +1,6 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_yuthon_contract_wizard,yuthon.contract.wizard,model_yuthon_contract_wizard,,1,1,1,1 +access_hr_contract_change_line,hr.contract.change.line,model_hr_contract_change_line,,1,1,1,1 diff --git a/yuthon_contract/views/inherit_hr_contract_views.xml b/yuthon_contract/views/inherit_hr_contract_views.xml index 51eb9c8c8..827e17fa5 100644 --- a/yuthon_contract/views/inherit_hr_contract_views.xml +++ b/yuthon_contract/views/inherit_hr_contract_views.xml @@ -87,7 +87,7 @@ 工作日历 - 1 + 0 @@ -108,16 +108,24 @@ 乙方信息 - - - - - - - - - - + + 1 + + + 1 + + + + + + + + + + + + +