From 4be1d794120a8f3a79dd29900279bc5f188bf36a Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 22 Aug 2025 18:15:57 +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 --- .../wizard/property_reconciliation_wizard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py index 1416cd9f1..b4984b5fc 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py @@ -323,8 +323,10 @@ class PropertyReconciliationWizard(models.Model): }) management_type_id = self.env['yuthon.management.type'].search([('name', '=', '违约金')]) if line.collection_type == 'penalty': + extract_start_date = date_match.group(1) if date_match else line.due_date + extract_end_date = date_match.group(2) if date_match else None check_domain = [ - ('due_date', '=', line.due_date), + ('due_date', '=', extract_start_date), ('property_id', '=', line.property_id.id), ('contract_id', '=', line.contract_id.id), ('management_type_id', '=', management_type_id.id), @@ -337,8 +339,6 @@ class PropertyReconciliationWizard(models.Model): # 用备注的的开始日期和结束日期 date_pattern = r'(\d{4}-\d{2}-\d{2})[至-](\d{4}-\d{2}-\d{2})' date_match = re.search(date_pattern, line.remake or '') - extract_start_date = date_match.group(1) if date_match else line.due_date - extract_end_date = date_match.group(2) if date_match else None if not existing_record: domain2 = [ ('due_date', '=', line.due_date), From f62eb27d682dfba35c1fdc71df11453bf86784fa Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 22 Aug 2025 18:16:27 +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 --- .../wizard/property_reconciliation_wizard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py index b4984b5fc..2206f63fd 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py @@ -323,6 +323,9 @@ class PropertyReconciliationWizard(models.Model): }) management_type_id = self.env['yuthon.management.type'].search([('name', '=', '违约金')]) if line.collection_type == 'penalty': + # 用备注的的开始日期和结束日期 + date_pattern = r'(\d{4}-\d{2}-\d{2})[至-](\d{4}-\d{2}-\d{2})' + date_match = re.search(date_pattern, line.remake or '') extract_start_date = date_match.group(1) if date_match else line.due_date extract_end_date = date_match.group(2) if date_match else None check_domain = [ @@ -336,9 +339,6 @@ class PropertyReconciliationWizard(models.Model): existing_record = self.env['property.accounts.receivable'].search(check_domain) is_reconciliation = line.amount == round(line.rent, 2) - # 用备注的的开始日期和结束日期 - date_pattern = r'(\d{4}-\d{2}-\d{2})[至-](\d{4}-\d{2}-\d{2})' - date_match = re.search(date_pattern, line.remake or '') if not existing_record: domain2 = [ ('due_date', '=', line.due_date),