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 @@