From 9d2cc5d110f2f5fde0750dabdcc3ef0a2b4b93fe Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Wed, 26 Mar 2025 10:59:19 +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 | 6 ++++++ yuthon_salary/views/inherit_hr_payslip_views.xml | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index 3db44e06e..c16cb0c3b 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -151,6 +151,12 @@ class InheritHrPayslip(models.Model): } } + + @api.onchange('year_compute', 'year_jie', 'year_gong') + def _onchange_calculate_total_before_tax(self): + change_amount = self.year_compute + self.year_jie + self.year_gong + self.total_before_tax += change_amount + def action_salary_payslip_wizard(self): return { "type": "ir.actions.act_window", diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index 7329d9679..672f1a473 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -29,6 +29,7 @@ + @@ -161,6 +162,7 @@ + @@ -169,6 +171,9 @@ + + + @@ -176,9 +181,6 @@ - - - @@ -193,6 +195,7 @@ +