From 4d21a969bfee5e53a8ef7720e029b988da687c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Mon, 29 Sep 2025 19:58:25 +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/wizard/salary_compute_wizard.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yuthon_salary/wizard/salary_compute_wizard.py b/yuthon_salary/wizard/salary_compute_wizard.py index 82982ea14..228704f1e 100644 --- a/yuthon_salary/wizard/salary_compute_wizard.py +++ b/yuthon_salary/wizard/salary_compute_wizard.py @@ -176,7 +176,7 @@ class SalaryComputeWizard(models.Model): ], limit=1) if not existing_payslip: - self.env['hr.payslip'].create({ + existing_payslip = self.env['hr.payslip'].create({ 'is_bold': is_bold, 'name': employee.name, 'employee_id': employee.id, @@ -186,7 +186,8 @@ class SalaryComputeWizard(models.Model): 'salary_group_id': contract_id.salary_group_id.id if contract_id else employee.contract_id.salary_group_id.id, 'payslip_run_id': payslip_run_id.id, 'state': 'draft', - }).compute_sheet() + }) + existing_payslip.compute_sheet() internship_ids = self.env['hr.payslip'].search([ ('is_push', '=', False),