From 1af8f163c9f66a256e73f8ff57b6e53c8d205e33 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Tue, 8 Apr 2025 16:09:21 +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/inherit_hr_payslip.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index 4c26e8f20..bd4280b8a 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -254,10 +254,6 @@ class InheritHrPayslip(models.Model): for record in self: record.write({'is_salary_push': True}) - def return_salary_button(self): - for record in self: - record.write({'is_salary_release': False}) - def action_put_wizard(self): return { "type": "ir.actions.act_window", @@ -313,7 +309,8 @@ class InheritHrPayslip(models.Model): def put_release(self): for record in self: record.write({ - 'is_salary_release': True + 'is_salary_release': True, + 'salary_state': 'to_release', }) def all_put_release(self): @@ -324,6 +321,12 @@ class InheritHrPayslip(models.Model): 'salary_state': 'to_release', }) + def return_salary_button(self): + for record in self: + record.write({'is_salary_release': False, + 'salary_state': 'to_signed'}) + + def all_return_release(self): payslip_ids = self.env["hr.payslip"].browse(self._context.get('active_ids', self._context.get('active_id'))) for record in payslip_ids: