From 065f3843b4485a00d7a99710b56e0f083aed9265 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Mon, 14 Jul 2025 14:22:59 +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_line.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yuthon_salary/models/inherit_hr_payslip_line.py b/yuthon_salary/models/inherit_hr_payslip_line.py index 244c3d742..74800b052 100644 --- a/yuthon_salary/models/inherit_hr_payslip_line.py +++ b/yuthon_salary/models/inherit_hr_payslip_line.py @@ -14,8 +14,10 @@ class InheritHrPayslipLine(models.Model): @api.onchange('total') def _onchange_total(self): for rec in self: - if rec.total: + if rec.total != 0: if rec.total != rec.amount: rec.is_amount = True else: - rec.is_amount = False \ No newline at end of file + rec.is_amount = False + else: + rec.is_amount = False \ No newline at end of file