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: