From 07124fb584290a30b6f70f4f2e4a523cf8787879 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Mon, 23 Jun 2025 17:24:43 +0800 Subject: [PATCH] =?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 --- yuthon_salary/models/yuthon_payroll_project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yuthon_salary/models/yuthon_payroll_project.py b/yuthon_salary/models/yuthon_payroll_project.py index c0e8f2eb1..08c453f8d 100644 --- a/yuthon_salary/models/yuthon_payroll_project.py +++ b/yuthon_salary/models/yuthon_payroll_project.py @@ -242,10 +242,11 @@ class YuthonPayrollInsurances (models.Model): 'name': ins.name, 'category_id': self.env['hr.salary.rule.category'].search([('name', '=', '五险一金')], limit=1).id, 'code': code, + 'company_id': ins.company_id.id, 'amount_select': 'code', 'amount_python_compute': formula_salary, 'struct_id': sal.id, }]) sal.write({'rule_ids': rule_list}) else: - sal.rule_ids.search([('name', '=', ins.name)]).write({'amount_python_compute': formula_salary, 'code':code,}) + sal.rule_ids.search([('name', '=', ins.name), ('company_id', '=', ins.company_id.id)]).write({'amount_python_compute': formula_salary, 'code':code,})