diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 99311dc68..ebf14f8e3 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.name', '=', self.your_own_unit), + ('contract_id.lessor_id.display_name', '=', 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.name', '=', self.your_own_unit), + ('contract_id.lessor_id.display_name', '=', 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.name', '=', self.your_own_unit), + ('contract_id.lessor_id.display_name', '=', 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.name', '=', self.your_own_unit), + ('contract_id.lessor_id.display_name', '=', 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.name', '=', self.your_own_unit), + ('contract_id.lessor_id.display_name', '=', self.your_own_unit), ('management_type_id.name', '=', '电费'), ('is_reconciliation', '=', False), ('due_date', '<=', fields.Date.to_string(last_day)),