From b3a2bc6e7341c503b051cd64d7117ec842210fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Mon, 22 Jun 2026 19:25:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_report/models/current_month_received_report.py | 4 ++++ yuthon_report/models/total_received_report.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/yuthon_report/models/current_month_received_report.py b/yuthon_report/models/current_month_received_report.py index 894f89c69..70ad3d0db 100644 --- a/yuthon_report/models/current_month_received_report.py +++ b/yuthon_report/models/current_month_received_report.py @@ -59,8 +59,12 @@ class CurrentMonthReceivedReport(models.Model): domain.append(('receivable_id.lessee_id', '=', lessee_id)) if contract_id: domain.append(('receivable_id.contract_id', '=', contract_id)) + # 经营收入只统计租金类,排除押金、违约金 + exclude_types = ['押金', '违约金'] if management_type_id: domain.append(('receivable_id.management_type_id', '=', management_type_id)) + else: + domain.append(('receivable_id.management_type_id.name', 'not in', exclude_types)) lines = self.search(domain, order="receivable_id asc") diff --git a/yuthon_report/models/total_received_report.py b/yuthon_report/models/total_received_report.py index acaced3b5..962bfb8ed 100644 --- a/yuthon_report/models/total_received_report.py +++ b/yuthon_report/models/total_received_report.py @@ -54,8 +54,12 @@ class TotalReceivedReport(models.Model): domain.append(('receivable_id.precinct_id', 'in', partner_id)) if company_id: domain.append(('receivable_id.company_id', 'in', company_id)) + # 经营收入只统计租金类,排除押金、违约金 + exclude_types = ['押金', '违约金'] if management_type_id: domain.append(('receivable_id.management_type_id', '=', management_type_id)) + else: + domain.append(('receivable_id.management_type_id.name', 'not in', exclude_types)) if property_id: domain.append(('receivable_id.property_ids', 'in', [property_id])) if lessee_id: