From 79dce2d2052dcc3b622d82cc5b68985f126ac3c9 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Tue, 29 Jul 2025 22:56:07 +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/inherit_yuthon_property.py | 8 +------- yuthon_property_approval/wizard/accounts_wizard_views.xml | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index bb2c5887e..c81911f4e 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -121,15 +121,13 @@ class PropertyBankStatements(models.Model): def _get_reconciliation_vals(self, record): if record.name: dt = datetime.strptime(str(self.start_time), '%Y-%m-%d %H:%M:%S').date() - first_day = dt.replace(day=1) - last_day = first_day + relativedelta(months=1) - relativedelta(days=1) + last_day = dt.replace(day=1) + relativedelta(months=1) - relativedelta(days=1) total_rent_month = 0 # 应收租金 rent_ids = self.env['property.accounts.receivable'].search([ ('lessee_id.name', '=', record.name_account), ('management_type_id.name', '=', '租金'), ('is_reconciliation', '=', False), - ('due_date', '>=', fields.Date.to_string(first_day)), ('due_date', '<=', fields.Date.to_string(last_day)), ]) # 应收押金 @@ -137,7 +135,6 @@ class PropertyBankStatements(models.Model): ('lessee_id.name', '=', record.name_account), ('management_type_id.name', '=', '押金'), ('is_reconciliation', '=', False), - ('due_date', '>=', fields.Date.to_string(first_day)), ('due_date', '<=', fields.Date.to_string(last_day)), ]) # 应收管理费 @@ -145,7 +142,6 @@ class PropertyBankStatements(models.Model): ('lessee_id.name', '=', record.name_account), ('management_type_id.name', '=', '管理费'), ('is_reconciliation', '=', False), - ('due_date', '>=', fields.Date.to_string(first_day)), ('due_date', '<=', fields.Date.to_string(last_day)), ]) # 应收水费 @@ -153,7 +149,6 @@ class PropertyBankStatements(models.Model): ('lessee_id.name', '=', record.name_account), ('management_type_id.name', '=', '水费'), ('is_reconciliation', '=', False), - ('due_date', '>=', fields.Date.to_string(first_day)), ('due_date', '<=', fields.Date.to_string(last_day)), ]) # 应收电费 @@ -161,7 +156,6 @@ class PropertyBankStatements(models.Model): ('lessee_id.name', '=', record.name_account), ('management_type_id.name', '=', '电费'), ('is_reconciliation', '=', False), - ('due_date', '>=', fields.Date.to_string(first_day)), ('due_date', '<=', fields.Date.to_string(last_day)), ]) diff --git a/yuthon_property_approval/wizard/accounts_wizard_views.xml b/yuthon_property_approval/wizard/accounts_wizard_views.xml index 1212c773b..d6aa32b96 100644 --- a/yuthon_property_approval/wizard/accounts_wizard_views.xml +++ b/yuthon_property_approval/wizard/accounts_wizard_views.xml @@ -16,10 +16,10 @@