From cad50fb975713879f81eb8db74b1a611c79b1c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Tue, 23 Sep 2025 18:27:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/inherit_yuthon_property.py | 13 +++++++------ .../wizard/binding_information_wizard.py | 3 --- 2 files changed, 7 insertions(+), 9 deletions(-) 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):