Merge pull request !12202 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-06-22 11:26:42 +00:00
committed by Gitee
2 changed files with 8 additions and 0 deletions
@@ -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")
@@ -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: