From 3c81cadb86fe49e973d76733e037202398c1ebe8 Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Mon, 4 Aug 2025 10:53:17 +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
---
yuthon_property_approval/models/property_lease_contract.py | 3 +--
yuthon_property_approval/views/property_early_quitting.xml | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py
index 0776aea67..c640e4481 100644
--- a/yuthon_property_approval/models/property_lease_contract.py
+++ b/yuthon_property_approval/models/property_lease_contract.py
@@ -1453,7 +1453,7 @@ class PropertyLeaseContract(models.Model):
for record in lease_contract_ids:
if len(lease_contract_ids) > 1:
raise UserError("续租审批只能提交一个物业合同")
- address_id = record.lease_ids[0].address_id if record.lease_ids else ''
+ address_id = record.lease_ids[-1].address_id if record.lease_ids else ''
return {
'name': '退租申请',
"type": "ir.actions.act_window",
@@ -1464,7 +1464,6 @@ class PropertyLeaseContract(models.Model):
'default_address_id': address_id.id,
'default_end_data': record.term_end_time,
'default_start_data': record.term_start_time,
- 'default_contract_id': record.id,
},
}
diff --git a/yuthon_property_approval/views/property_early_quitting.xml b/yuthon_property_approval/views/property_early_quitting.xml
index 041a98cb9..8bf674545 100644
--- a/yuthon_property_approval/views/property_early_quitting.xml
+++ b/yuthon_property_approval/views/property_early_quitting.xml
@@ -49,7 +49,7 @@
-
+