@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user