From c59fc6f6ed2873547d0b47471b8eff068cd14461 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Mon, 7 Jul 2025 11:04:28 +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/select_delete_wizard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yuthon_salary/wizard/select_delete_wizard.py b/yuthon_salary/wizard/select_delete_wizard.py index 09f56fb04..b7b682ab5 100644 --- a/yuthon_salary/wizard/select_delete_wizard.py +++ b/yuthon_salary/wizard/select_delete_wizard.py @@ -17,6 +17,9 @@ class SelectDeleteWizard(models.Model): def confirm(self): for record in self: if record.name: + payslip_lines = self.env['hr.payslip.line'].search([('name', '=', record.name)]) + payslip_lines.sudo().unlink() + structure_ids = self.env['hr.payroll.structure'].search([]) for structure in structure_ids: for rule in structure.rule_ids: