From 31c53f67325a9f0fbdfffb0d6888d7937269d467 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Sat, 20 Dec 2025 19:52:13 +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
---
.../models/property_lease_contract.py | 11 ++++++++++-
.../views/property_lease_contract.xml | 1 -
2 files changed, 10 insertions(+), 2 deletions(-)
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 @@
-