From 0efeb867d059f46bb0681c07303023d8456cbaef 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: Wed, 24 Sep 2025 11:56:55 +0800
Subject: [PATCH 1/2] =?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
---
.../views/property_lease_contract.xml | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml
index be1c5a0c4..1746f7019 100644
--- a/yuthon_property_approval/views/property_lease_contract.xml
+++ b/yuthon_property_approval/views/property_lease_contract.xml
@@ -896,13 +896,13 @@
code
action = model.trigger_lease_ids()
-
-
-
-
-
-
-
+
+ 关联物业
+
+
+ code
+ action = model.update_property()
+
管理员强制结束
From 300c352a635b5956471bd3a8cd3556ba79cf1439 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: Wed, 24 Sep 2025 12:01:30 +0800
Subject: [PATCH 2/2] =?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_property_approval/models/property_lease_contract.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py
index fa44205b1..722524ee0 100644
--- a/yuthon_property_approval/models/property_lease_contract.py
+++ b/yuthon_property_approval/models/property_lease_contract.py
@@ -456,6 +456,8 @@ class PropertyLeaseContract(models.Model):
record.name = self._description
def update_property(self):
+ existing_lines = self.env['property.contract.line'].search([])
+ existing_lines.unlink()
contract_ids = self.env["property.lease.contract"].browse(
self._context.get('active_ids', self._context.get('active_id')))
for contract_id in contract_ids: