@@ -66,11 +66,13 @@ class BatchInvoiceExportWizard(models.TransientModel):
|
||||
|
||||
sheet['B2'] = f'{title_year}年{title_month}月'
|
||||
|
||||
# 统计最常见公司(用于C2)
|
||||
# 统计最常见公司(用于C2,取合同出租方公司简称)
|
||||
company_list = []
|
||||
for record in receivable_records:
|
||||
if record.contract_id and record.contract_id.company_id:
|
||||
company_list.append(record.contract_id.company_id.name)
|
||||
if record.contract_id and record.contract_id.lessor_id:
|
||||
referred = record.contract_id.lessor_id.referred
|
||||
if referred:
|
||||
company_list.append(referred)
|
||||
|
||||
if company_list:
|
||||
from collections import Counter
|
||||
|
||||
Reference in New Issue
Block a user