diff --git a/yuthon_hr_employee/models/hr_employee_page.py b/yuthon_hr_employee/models/hr_employee_page.py index a83e919a0..044b6ca19 100644 --- a/yuthon_hr_employee/models/hr_employee_page.py +++ b/yuthon_hr_employee/models/hr_employee_page.py @@ -97,3 +97,33 @@ class YuthonMostRecentWorkDetailLine(models.Model): work_grades = fields.Char(string='工作内容成绩') last_training = fields.Char(string='培训') last_work_reason = fields.Char(string='离职原因') + +class ChildCareLine(models.Model): + _name = 'child.care.line' + _description = "婴幼儿照护" + + employee_id = fields.Many2one('hr.employee', string="关联员工") + name = fields.Char(string="姓名") + date = fields.Date(string="出生日期") + deduction = fields.Float(string="本人扣除比例") + + +class ChildEducationLine(models.Model): + _name = 'child.education.line' + _description = "子女教育" + + employee_id = fields.Many2one('hr.employee', string="关联员工") + name = fields.Char(string="姓名") + start_date = fields.Date(string="教育开始日期") + end_date = fields.Date(string="教育结束日期") + deduction = fields.Float(string="本人扣除比例") + + +class ElderlySupportLine(models.Model): + _name = 'elderly.support.line' + _description = "赡养老人" + + employee_id = fields.Many2one('hr.employee', string="关联员工") + name = fields.Char(string="姓名") + date = fields.Date(string="出生日期") + deduction = fields.Float(string="本人扣除比例") \ No newline at end of file diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py index ad3346f6b..8f8b2f8d0 100644 --- a/yuthon_hr_employee/models/yuthon_hr_employee.py +++ b/yuthon_hr_employee/models/yuthon_hr_employee.py @@ -128,6 +128,25 @@ class YuthonHrEmployee(models.Model): education_experience_ids = fields.One2many('yuthon.education.experience.line', 'employee_id', string="教育经历明细行") # 技能证书管理 skills_certificates_ids = fields.One2many('yuthon.skills.certificates.line', 'employee_id', string="教育经历明细行") + # 专项扣除 + care_line_ids = fields.One2many('child.care.line', 'employee_id', string="婴幼儿照护明细行") + education_line_ids = fields.One2many('child.education.line', 'employee_id', string="子女教育明细行") + support_line_ids = fields.One2many('elderly.support.line', 'employee_id', string="赡养老人明细行") + hospital_name = fields.Char(string="姓名") + hospital_related = fields.Char(string="与纳税人关系") + original_amount = fields.Float(string='个人负担金额') + + education_name = fields.Char(string="姓名") + education_end_date = fields.Date(string="结束时间") + education_deduction = fields.Float(string='扣除金额') + + loan_name = fields.Char(string="姓名") + loan_end_date = fields.Date(string="结束时间") + loan_deduction = fields.Float(string='扣除金额') + + rent_name = fields.Char(string="姓名") + rent_end_date = fields.Date(string="结束时间") + rent_deduction = fields.Float(string='扣除金额') pinyin_name = fields.Char(string="拼音名称", compute='_compute_pinyin', index=True, store=True) pinyin_min = fields.Char(string='拼音缩写', compute='_compute_pinyin', index=True, store=True) diff --git a/yuthon_hr_employee/security/ir.model.access.csv b/yuthon_hr_employee/security/ir.model.access.csv index a2d039f06..536dab885 100644 --- a/yuthon_hr_employee/security/ir.model.access.csv +++ b/yuthon_hr_employee/security/ir.model.access.csv @@ -19,4 +19,7 @@ access_yuthon_party_setting,yuthon_party_setting,model_yuthon_party_setting,base access_yuthon_medical_rule,yuthon_medical_rule,model_yuthon_medical_rule,base.group_user,1,1,1,1 access_yuthon_medical_manage,yuthon_medical_manage,model_yuthon_medical_manage,base.group_user,1,1,1,1 access_yuthon_medical_line,yuthon_medical_line,model_yuthon_medical_line,base.group_user,1,1,1,1 -access_yuthon_salary_group,yuthon_salary_group,model_yuthon_salary_group,base.group_user,1,1,1,1 \ No newline at end of file +access_yuthon_salary_group,yuthon_salary_group,model_yuthon_salary_group,base.group_user,1,1,1,1 +access_child_care_line,child_care_line,model_child_care_line,base.group_user,1,1,1,1 +access_child_education_line,child_education_line,model_child_education_line,base.group_user,1,1,1,1 +access_elderly_support_line,elderly_support_line,model_elderly_support_line,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml index 1ee9635c4..a68058b7d 100644 --- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml +++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml @@ -6,7 +6,7 @@ - + 0 @@ -90,7 +90,8 @@ - + @@ -177,7 +178,7 @@ - + @@ -201,6 +202,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -239,7 +317,7 @@ - + diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index d1d2d25d6..7f435cc7d 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -10,6 +10,14 @@ class InheritHrPayslip(models.Model): commuting_allowance = fields.Float(string='通信补贴', compute='_compute_salary', store=True) rank_salary = fields.Float(string='职级工资', compute='_compute_salary', store=True) account_id = fields.Many2one('yuthon.account.group', string='工资表分组') + housing_loan_interest = fields.Float(string='累计住房贷款利息') + housing_rent = fields.Float(string='累计住房租金') + child_education = fields.Float(string='累计子女教育') + continuing_education = fields.Float(string='累计继续教育') + elderly_support = fields.Float(string='累计赡养老人') + infant_care = fields.Float(string='累计3岁以下婴幼儿照护') + occupational_annuity = fields.Float(string='企业(职业)年金') + @api.depends('line_ids') def _compute_salary(self): diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index 0d342398f..fca61f53b 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -48,6 +48,25 @@ 1 + + + + + + + + + + + + + + + + + + + diff --git a/yuthon_sps_approval/views/inherit_hr_employee_views.xml b/yuthon_sps_approval/views/inherit_hr_employee_views.xml index 9d06b50ae..553d87d19 100644 --- a/yuthon_sps_approval/views/inherit_hr_employee_views.xml +++ b/yuthon_sps_approval/views/inherit_hr_employee_views.xml @@ -5,7 +5,7 @@ hr.employee - +