diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 40ea8477f..99feb3c5f 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -179,7 +179,7 @@ class PropertyLeaseContract(models.Model): def onchange_lease_term_year(self): for record in self: if record.lease_term_year or record.lease_term_month: - if record.lease_term_day: + if not record.lease_term_day: if record.term_start_time: year = record.lease_term_year if record.lease_term_year else 0 month = record.lease_term_month if record.lease_term_month else 0