From 107e2f835d0ad76020ca456ebb6b2a4a33b0140b 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: Mon, 16 Mar 2026 14:48:35 +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 --- yuthon_property_approval/wizard/property_rental_wizard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index b19b524f1..e91b7404b 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -221,7 +221,8 @@ class PropertyRentalWizard(models.Model): # 判断是否是最新合同版本 new_version = True all_versions = self.env['property.lease.contract'].search([ - ('contract_code', '=', record.contract_code) + ('contract_code', '=', record.contract_code), + ('property_name', '=', record.property_name), ]) if all_versions: version_info = [] @@ -263,6 +264,7 @@ class PropertyRentalWizard(models.Model): records = self.env['property.lease.contract'].search(domain +[ ('actual_start_time', '<', next_month_first_day), ('actual_end_time', '>=', first_day), + ('contract_code', '=', 'TX2025-A004') ]) if not records: records = self.env['property.lease.contract'].search(domain +[ From fb654349e0d569b9290a7635e828fe084b2fb167 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: Mon, 16 Mar 2026 14:57:31 +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/wizard/property_rental_wizard.py | 1 - 1 file changed, 1 deletion(-) diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index e91b7404b..33496f375 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -264,7 +264,6 @@ class PropertyRentalWizard(models.Model): records = self.env['property.lease.contract'].search(domain +[ ('actual_start_time', '<', next_month_first_day), ('actual_end_time', '>=', first_day), - ('contract_code', '=', 'TX2025-A004') ]) if not records: records = self.env['property.lease.contract'].search(domain +[