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