diff --git a/yuthon_salary/models/yuthon_payroll_project.py b/yuthon_salary/models/yuthon_payroll_project.py index a2c4e20c8..2a9cb37fd 100644 --- a/yuthon_salary/models/yuthon_payroll_project.py +++ b/yuthon_salary/models/yuthon_payroll_project.py @@ -175,21 +175,26 @@ class YuthonPayrollInsurances (models.Model): formula_salary = '' if ins.name not in sal.rule_ids.mapped('name'): number = ins.proportion_employee * 0.01 + code = 'None' if ins.name == '基本医疗保险费': + code = 'JBYLIAO' formula_salary = "result = employee.medical_insurance_base * " + str(number) if ins.name == '基本养老保险费': + code = 'JBYLAO' formula_salary = "result = employee.pension_insurance_base * " + str(number) if ins.name == '失业保险费': + code = 'SYBX' formula_salary = "result = employee.social_base_on * " + str(number) if ins.name == '工伤保险费': + code = 'GSBX' formula_salary = "result = employee.work_injury_insurance_base * " + str(number) if ins.name == '住房公积金': + code = 'ZFGJJ' formula_salary = "result = employee.housing_fund_base * " + str(number) - code = "".join([p[0][0] for p in pinyin(ins.name, style=Style.FIRST_LETTER)]).upper() rule_list.append([0, 0, { 'name': ins.name, 'category_id': self.env['hr.salary.rule.category'].search([('name', '=', '五险一金')], limit=1).id, - 'code': code if ins.name != '基本养老保险费' else 'JBYLBXF2', + 'code': code, 'amount_select': 'code', 'amount_python_compute': formula_salary, 'struct_id': sal.id,