diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index ebf14f8e3..e693b462a 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -146,7 +146,7 @@ class PropertyBankStatements(models.Model): # 应收租金 rent_ids = self.env['property.accounts.receivable'].search([ ('lessee_id.name', '=', record.name_account), - ('contract_id.lessor_id.display_name', '=', self.your_own_unit), + ('contract_id.lessor_id.referred', '=', self.your_own_unit), ('management_type_id.name', '=', '租金'), ('is_reconciliation', '=', False), ('due_date', '<=', fields.Date.to_string(last_day)), @@ -154,7 +154,7 @@ class PropertyBankStatements(models.Model): # 应收押金 deposit_ids = self.env['property.accounts.receivable'].search([ ('lessee_id.name', '=', record.name_account), - ('contract_id.lessor_id.display_name', '=', self.your_own_unit), + ('contract_id.lessor_id.referred', '=', self.your_own_unit), ('management_type_id.name', '=', '押金'), ('is_reconciliation', '=', False), ('due_date', '<=', fields.Date.to_string(last_day)), @@ -162,7 +162,7 @@ class PropertyBankStatements(models.Model): # 应收管理费 management_ids = self.env['property.accounts.receivable'].search([ ('lessee_id.name', '=', record.name_account), - ('contract_id.lessor_id.display_name', '=', self.your_own_unit), + ('contract_id.lessor_id.referred', '=', self.your_own_unit), ('management_type_id.name', '=', '管理费'), ('is_reconciliation', '=', False), ('due_date', '<=', fields.Date.to_string(last_day)), @@ -170,7 +170,7 @@ class PropertyBankStatements(models.Model): # 应收水费 water_ids = self.env['property.accounts.receivable'].search([ ('lessee_id.name', '=', record.name_account), - ('contract_id.lessor_id.display_name', '=', self.your_own_unit), + ('contract_id.lessor_id.referred', '=', self.your_own_unit), ('management_type_id.name', '=', '水费'), ('is_reconciliation', '=', False), ('due_date', '<=', fields.Date.to_string(last_day)), @@ -178,7 +178,7 @@ class PropertyBankStatements(models.Model): # 应收电费 electricity_ids = self.env['property.accounts.receivable'].search([ ('lessee_id.name', '=', record.name_account), - ('contract_id.lessor_id.display_name', '=', self.your_own_unit), + ('contract_id.lessor_id.referred', '=', self.your_own_unit), ('management_type_id.name', '=', '电费'), ('is_reconciliation', '=', False), ('due_date', '<=', fields.Date.to_string(last_day)), @@ -278,7 +278,8 @@ class PropertyBankStatements(models.Model): "default_actual_total": record.original_amount, "default_reconciliation_line_ids": all_vals, 'default_amount_reconciled': self.no_amount, - "default_receivable_total": total_rent_month + "default_receivable_total": total_rent_month, + "dialog_size" : "extra-large", } return { diff --git a/yuthon_property_approval/wizard/binding_information_wizard.py b/yuthon_property_approval/wizard/binding_information_wizard.py index bb37036f1..fdfd99445 100644 --- a/yuthon_property_approval/wizard/binding_information_wizard.py +++ b/yuthon_property_approval/wizard/binding_information_wizard.py @@ -69,12 +69,9 @@ class BindingInformationWizard(models.Model): unreconciled_records = self.env['property.accounts.receivable'].search([ ('is_reconciliation', '=', False) ]) - # 提取物业和合同ID列表(去重) - property_ids = list(set(record.property_id.id for record in unreconciled_records if record.property_id)) contract_ids = list(set(record.contract_id.id for record in unreconciled_records if record.contract_id)) # 设置计算字段值 - record.available_property_ids = [(6, 0, property_ids)] if property_ids else [(5,)] record.available_contract_ids = [(6, 0, contract_ids)] if contract_ids else [(5,)] def confirm(self):