diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 0b6853224..1beebb00c 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -614,7 +614,16 @@ class PropertyLeaseContract(models.Model): contract_ids = self.env["property.lease.contract"].browse( self._context.get('active_ids', self._context.get('active_id'))) for rec in contract_ids: - rec.onchange_lease_ids() + if rec.electricity_fee_ids: + for line in rec.electricity_fee_ids: + line.is_fix_loss = 'yes' + if line.unit_price > 0: + line.is_fix_price = 'yes' + if rec.water_fee_ids: + for line in rec.water_fee_ids: + line.is_fix_loss = 'yes' + if line.unit_price > 0: + line.is_fix_price = 'yes' def update_admin_id(self): contract_ids = self.env["property.lease.contract"].browse( diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index b3c1a8ad7..03745c446 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -839,7 +839,6 @@ -